recentpopularlog in
« earlier   later »
No value for $TERM and no -T specified - Ask Ubuntu
Maybe 'if test -t 1' is better ("if stdout is connected to a terminal"), because what `tty` does is "print the file name of the terminal connected to standard input."

This breaks colors if the input to your script is coming from a pipe, which is usually not what you want.
If you do this

<code class="language-bash">
if tty -s
: # your tput commands

It will fix your problem. Without the -s option tty will either display your tty or write "not a tty"
tput  terminal  bash  ansi  color  shellscripting  maybesolution 
september 2017
Bioconductor - motifStack |
I needed to uninstall R 3.4.1 from MacPorts and use the official R 3.4.1 installer from

The gfortran package at was NOT required.
r  bioconductor  sequencelogo  bioinformatics  motifs  plotting 
september 2017
R for Mac OS X - Development Tools and Libraries |
I did not find these to be necessary for building packages from source (ade4) when after uninstalling R 3.4.1 from MacPorts and using the official OS X installer from
r  devel  mac  osx  reference 
september 2017
Find a macports package given a file name - Stack Overflow |
Unfortunately MacPorts currently (2.3.1) only supports that if you have the port installed, i.e. if you want to find out which port installed a file on your system. In this case, you can use port provides <filename>.

If you are looking for a port to install using an executable name, you're out of luck – MacPorts doesn't have the required databases to do that.

What I usually do instead is search for the file in a Linux distribution, e.g. using apt-file search <filename> on Debian. Given the Debian package name, I search for a similar MacPorts port.
mac  osx  macports  fuckina  packagemanagement  sysadmin  dammitbrain  solution 
september 2017
3.3. Common Tasks |
If you want to find all ports that depend on a given other port, you can use

$ port echo depends:<portname>

If you are only interested in the dependent ports that you actually have installed, you can use the quicker and more accurate dependents:

$ port dependents <portname>

$ port dependents libksba

gnupg2 depends on libksba
gpg-agent depends on libksba

MacPorts also has a recursive version of the dependents action called rdependents:

$ port rdependents libksba

The following ports are dependent on libksba:

Finally, to find out which port you manually installed caused the automatic installation of a dependency, use the following expression:

$ port installed requested and rdependentof:<portname>

$ port installed requested and rdependentof:libksba
mac  osx  packagemanagement  macports  dammitbrain  essential  sysadmin  reference 
september 2017
macos - How to find out a file belongs to which package in Mac OS X? - Super User |
It's a little late, but perhaps it will be of help to others.

You can use the pkgutil command.

For example, if you want to know what package the "less" command belongs to run:

pkgutil --file-info /usr/bin/less

Which will output something like:

volume: /
path: /usr/bin/less

install-time: 1310407891
uid: 0
gid: 0
mode: 755

To list all files contained in a package, in our example, run:

pkgutil --files

I know this tool has been present since OS X 10.6.
mac  osx  packagemanagement  commandline  annoyance  likedebian  solution 
september 2017
Rcpp, RcppArmadillo and OS X Mavericks "-lgfortran" and "-lquadmath" error - The Coatless Professor |
I didn't actually need any of this to install ade4 after uninstalling R 3.4.1 from MacPorts and using the official installer from, which seems to have all the right pieces in place.
r  fortran  compiler  error  mac  osx  elcapitan  maybesolution 
september 2017
Where does R store packages? - Stack Overflow |

The install.packages command looks through the .libPaths variable. Here's what mine defaults to on OSX:

> .libPaths()
[1] "/Library/Frameworks/R.framework/Resources/library"

I don't install packages there by default, I prefer to have them installed in my home directory. In my .Rprofile, I have this line:

.libPaths( "/Users/tex/lib/R" )

This adds the directory "/Users/tex/lib/R" to the front of the .libPaths variable.
r  packagemanagement  devel  whereis  solution 
september 2017
installation on Mac OS from source with error · Issue #5 · sdray/ade4 |
I was trying to install the motifStack Bioconductor package when I got this error.
ld: library not found for -lgfortran
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Installing gfortran-4.2.3.pkg from CRAN's "R for Mac OS X" page helped, but I got the same error for libquadmath right afterwards, so it's not a total solution, and something else must be wrong.
errormessage  clang  compiler  toolchain  r  mac  osx  almost  solution 
september 2017
How can I check in a bash script if my local git repo has changes - Stack Overflow |
<code class="language-bash">
cd /git/directory
if [[ `git status --porcelain` ]]; then
# changes
# no changes

This would be OK, but doesn't pick up untracked (newly-added) files:

<code class="language-bash">
git diff --no-ext-diff --quiet --exit-code
git  versioncontrol  scm  shellscripting  solution 
september 2017
Two separate services (one internal and one not) can be confusing · Issue #409 · quicksilver/Quicksilver · GitHub |
So I've started looking into this, since the ⌘⎋ shortcut doesn't work on the Mac at work. Interestingly enough, this is not the fault of QS, but the fault of the keyboard (?!?). The ⌘⎋ just doesn't seem to work AT ALL. I've installed key codes and when I press ⌘⎋ it doesn't register. All other shortcuts do. This is on 10.7.4, new Mac Mini with an Apple keyboard
(P.S. international English is so annoying. Where's the £ sign?!)

The intersesting thing, however, is that when QS simulates the ⌘⎋ keystrokes using carbon (in QSGlobalSelectionProvider.m invokeService) it does work (this is invoked when you use the 'current selection' object with the 'pull selection from frontmost app' option enabled.

Seeing as there seems to be this huge limitation with ⌘⎋ not actually registering as a keyboard shortcut, here's what I propose:

We remove the 'send to quicksilver' service
We keep the get current selection (internal) service, but rename it to something more obvious so as it isn't changed. e.g. Quicksilver Internal Selection (Private)
We make a new default trigger called 'get selection' that literally just does select current selection in command window. People would be told NOT to touch the ⌘⎋ shortcut in the keyboard preferences (if they do, things will) but to edit the trigger keyboard shortcut.
For those who still like the ⌘⎋ shortcut, and for whom it still works, since it'll still be enabled (as a 'private' service) you can still use that.
Added bonus: Using the current selection proxy works more consistently than the service in Finder (e.g. try the service on a folder in Finder when in column mode) so it should fix a few problems

Once we're down to one service, I'll start working on the few bugs with the 'current selection' proxy :)
quicksilver  hotkey  finder  filemanagement  tipsandtricks 
september 2017
Issues with Finder Selection (Proxies and Service) · Issue #485 · quicksilver/Quicksilver · GitHub |
Mentioned in IRC, but ⌥⌘G is "Grab 'n' Drop". It's a shortcut for "move the Finder Selection here". Hitting it should result in the interface showing [Finder Selection] ⇥ Move to… ⇥ [Quicksilver Selection], at which point you can hit ↩ to confirm.
quicksilver  hotkey  finder  filemanagement  tipsandtricks 
september 2017
Extension:MMHandler - MediaWiki |
This works fine, but the documentation needs fixed. There's no need to wrap it in '<mm>' tags; just including the "[[]]" wikilink is enough.
freemind  mindmap  mediawiki  extension  solution 
september 2017
A Baby Wails, and the Adult World Comes Running -
Studying both superfast brain scans of healthy volunteers and direct electrode measurements in adult patients who were undergoing neurosurgery for other reasons, Dr. Young, with Christine E. Parsons of Aarhus University in Denmark, Morten L. Kringelbach of Oxford University and other colleagues, has tracked the brain’s response to the sound of an infant cry.

The researchers found that within 49 thousandths of a second of a recorded cry being played, the periaqueductal gray — an area deep in the midbrain that has long been linked to urgent, do-or-die behaviors — had blazed to attention, twice as fast as it reacted to dozens of other audio clips tested.
kids  infants  mammals  crying  instinct  research 
september 2017
Auld Lang Syne - Wikipedia
The song's Scots title may be translated into standard English as "old long since", or more idiomatically, "long long ago",[5] "days gone by" or "old times". Consequently, "For auld lang syne", as it appears in the first line of the chorus, might be loosely translated as "for (the sake of) old times".

See also:
music  uk 
september 2017
Tom Waits | Pitchfork
"It's weird talking about really funky old neighborhoods that you haven't been to in a while. There's this corner of 9th and Hennepin in Minneapolis. It used to spell trouble; now it spells sandals and yogurt."

Pitchfork: I've always enjoyed when songwriters incorporate elements from other songs, like the bit at the end of Bad as Me's "New Year's Eve" where "Auld Lang Syne" comes in.

TW: The song needed a chorus and they didn't have one. So Kathleen and I said, "Come on, we're talking about New Year's, let's just do it!" And if you've ever been at one of those gatherings where things went badly, where we all sing even though the fireworks scared the dog and he's been gone for two hours, and someone lit the sofa on fire, and Marge got food poisoning, and Bill O'Neal called the cops.

"New Year's Eve" was a long, long song that had to be cut down to what they call a pony. That's an alcoholic term for a small bottle. "Come on, give me a pony, man!" I think that's what they call those little bottles they give you on the airplane. Anyways, it was cut back to a more manageable size, but it still got the point across.
tomwaits  interview  newyears  badasme 
september 2017
How to minify js file without webpackJsonp wrapper? · Issue #2281 · webpack/webpack · GitHub
I noticed this JSONP "wrapper" getting created when I used webpack-file-loader on a bunch of images. I thought this might give me some hints as to how to disable that, but nope. I just left it be and ignored it.
webdevel  javascript  webpack  jsonp  reference 
september 2017
Plugins — Vue.js
This was apparently the case with vue-resource:
Some plugins provided by Vue.js official plugins such as vue-router automatically calls Vue.use() if Vue is available as a global variable. However in a module environment such as CommonJS, you always need to call Vue.use() explicitly:
vuejs  plugins  webdevel  solution 
september 2017
webpack-simple/webpack.config.js at master · vuejs-templates/webpack-simple · GitHub
devServer: {
historyApiFallback: true,
noInfo: true
performance: {
hints: false
devtool: '#eval-source-map'
vuejs  javascript  webdevel  uglify  webpack  configfile  reference 
september 2017
Wildcards in entry points · Issue #370 · webpack/webpack · GitHub
You can easily do this by your own, as the webpack.config.js is just a node.js module and allows to execute any code.

var glob = require("glob");
// ...
entry: glob.sync("./test/**/*Spec.js")
webpack  configfile  bundling  webdevel  solution 
september 2017
« earlier      later »
per page:    204080120160

Copy this bookmark:

to read