All posts

Three levels of GIT config

April 17, 2015

via http://www.codinginahurry.com/2011/02/05/three-levels-of-git-config/

Very nice explanation, via coding in a hurry
There are 3 levels of git config; project, global and system.
      • project: Project configs are only available for the current project and stored in .git/config in the project's directory.
      • global: Global configs are available for all projects for the current user and stored in ~/.gitconfig.
      • system: System configs are available for all the users/projects and stored in /etc/gitconfig.
Create a project specific config, you have to execute this under the project's directory.
git config user.name "John Doe"
Create a global config
git config --global user.name "John Doe"
Create a system config
git config --system user.name "John Doe"
And as you may guess, project overrides global and global overrides system.

Watching for changes (Polling notifications) in Evernote

April 16, 2015

via https://dev.evernote.com/doc/articles/polling_notification.php

Useful note about how to poll an Evernote account for new content. Also a test of web clipping with Enwrite.

Polling

If your app wants to know about changes in a user's Evernote account, you'll probably consider calling the NoteStore.findNotesMetadata function periodically to search for new notes. findNotes is incredibly powerful, but it's also expensive for our servers - we need to load the user's Lucene index, perform the search across all of their notes, hit the database to pull out the results, and send those results over the network to your app. If you're building a web application, you should use webhooks instead of polling. If you have to poll, you should follow the guidelines below.

How to create a new KVM VM using command line tools

April 14, 2015

virt-install --name=hostname --arch=x86_64 --vcpus=2 --ram=4096 --os-type=linux --os-variant=rhel7 --hvm --connect=qemu:///system --network bridge:br-fabric --cdrom=/var/lib/libvirt/images/CentOS-7.0-1406-x86_64-Minimal.iso --disk path=/var/lib/libvirt/images/hostname.img,size=32 --accelerate --vnc

Find all single-note tags in Evernote

January 14, 2015
I’ve been working on cleaning up my Evernote, and noticed that I have a lot of tags assigned to a single note. I had successfully used Veritrope’s excellent Evernote empty tag remover applescript, so I made some small changes to write the attached script, which will find all single-note tags in your Evernote and list them in a new note, including links to each note. This makes it much easier to go through them and see which of those tags could be removed.

Just download the script, open it in Script Editor and run it.

Tip of the hat to Justin for his excellent collection of scripts at Veritrope!


Mac keyboard shortcuts by Matt Gemmell

May 16, 2014
Another great article by Matt Gemmell. I knew most of them, but learned a few things. The golden part for me were the third-party utilities, in particular Shortcat, which I didn’t know and is amazing:

It’s basically Spotlight but for all visible controls and objects on the screen: it’s type-to-select for *everything you can see*.


The whole article is worth a read.

How to solve truncated docker output in Mac OS X using boot2docker

May 12, 2014

If you are using docker on Mac OS X using boot2docker (http://docs.docker.io/installation/mac/), you may see truncated output from docker run, and also may have noticed that docker attach does not work properly, producing only some output and then exiting. This bug is documented here: https://github.com/boot2docker/boot2docker/issues/150, where I also found the following workaround. Documenting it here in case anyone finds it useful:

Instead of using the default value of DOCKER_HOST provided by boot2docker up, establish the docker connection through an ssh tunnel:

Working from home - Matt Gemmell

May 7, 2014
Great article.

I’ve been working from home full-time for more than seven years, and running my own business for the same amount of time. Many of us at least have the opportunity to occasionally work from home, and I daresay that many people would like the chance to do so permanently.
It’s not just as straightforward as pulling out a laptop in the living room, though. Working from home has a number of difficulties and challenges. In many ways, it’s a battle for mastery of yourself. I’d like to talk about a few of the issues I’ve faced, and how I handle them.