Disable Command+Shift+I for launching Mail.app

Very useful:


It is very frustrating when trying to launch Developer Tools for Chrome and accidentally using "the other" common Command+Shift+* command key combination (instead of Command+Option+I) and having Mail.app launch instead... So, better to just remove the other shortcut ;)

Connect as `postgres` user to Docker container running postgres

For MacOSX usage, primarily:

Ensure you have the correct Docker environment:

$> eval "$(docker-machine env cloudviewerbox)"

... and find the running container:

$> docker ps
44809d71d591 sameersbn/postgresql:9.4-18 "/sbin/entrypoint.sh" 2 weeks ago Up 2 hours>5432/tcp slctest_postgres_1

How to empty a file on a *nix system

To empty a file, e.g. /path/to/foo.txt, do the following

cat /dev/null > /path/to/foo.txt


Find valid letters in string of numbers

Here is an attempt to, given a string, determine how many valid numbers are contained. Numbers are restricted to the letters of the alphabet they map to.

Tree traversal examples

Attempts at finding a solution to tree scans for target elements:

Ember Addon Shim Maintenance

Bower Shim Maintenance

This is one example of making Ember add-on using a Bower shim maintenance workflow. A Bower shim is basically a wrapper for some arbitrary set of files you want to become available in bower_components in a client application's project folders.

Using the ember-cli generator, developers can now easily add Bower dependencies to Ember projects via a call to addBowerPackageToProject in an afterInstall hook. More on this later.

cURLing with Basic Authentication

Note to self, cURL with Basic Authentication:

curl -i --user [username]:[password] \
    -H 'Content-Type: application/json' \
    -H 'Accept: application/json' \
    -H 'X-Some-Header: SomeValue' \
    -X GET 'schema://domain/arg/value/arg/etc'

Short conversation with my build tool


$> make money

build tool:

make: *** No rule to make target `money'.  Stop.

... short but to the point.

"su - root" or "sudo" complains of incorrect password but normal root login works

If you are unable to sudo or su, there are a couple binaries that may need setuid as the root user. On Fedora, it may just be that the user you're trying to sudo/su with a user who is not in the wheel group (other distributions use the sudoers group instead of wheel).

If you're sure you user is in wheel, check permissions on the sudo and su binaries like this (you should logged in as root for doing so):


Vim Paste/NoPaste

To toggle "paste" mode for Vim, do this to enable ctrl-v with proper indentation.

:set paste

Remember to type the ":" initially to enter command mode. You are then saying "set paste".

When you're done, reset to non-paste mode:

:set nopaste