Skip to content

Instantly share code, notes, and snippets.

dmccombs /
Created Apr 28, 2016
A simple way to use the GNOME keyring for SSH key managment in fish shell
# Add this to the bottom of your file
# Set SSH to use Gnome keyring
set -gx SSH_AUTH_SOCK (gnome-keyring-daemon --start | grep "^SSH_AUTH_SOCK" | awk -F "=" '{print $2}')
jvns /
Last active May 6, 2021
A list of questions you could ask while interviewing

A lot of these are outright stolen from Edward O'Campo-Gooding's list of questions. I really like his list.

I'm having some trouble paring this down to a manageable list of questions -- I realistically want to know all of these things before starting to work at a company, but it's a lot to ask all at once. My current game plan is to pick 6 before an interview and ask those.

I'd love comments and suggestions about any of these.

I've found questions like "do you have smart people? Can I learn a lot at your company?" to be basically totally useless -- everybody will say "yeah, definitely!" and it's hard to learn anything from them. So I'm trying to make all of these questions pretty concrete -- if a team doesn't have an issue tracker, they don't have an issue tracker.

I'm also mostly not asking about principles, but the way things are -- not "do you think code review is important?", but "Does all code get reviewed?".

View productivity and self-management
Fantastic, simple project management. Free tier does most things you'll ever need. I've tried Basecamp, Unfuddle and a million bug trackers, but a combination of Github and Trello is what I like best. Trello gives you a nice full overview of your whole project and who is doing what. It also makes it really easy to reorganize priorities. Unless my client has a project management tool they want me to use, I create a Trello board and add the client and try to centralize as much communication as possible in there.
Best time-tracking app I've tried, with native apps for just about every OS. Free tier does most things you'll ever need. Paid tier does even more and plugs into various other tools.
huonw / gist:5553335
Last active Dec 17, 2015
Rust > C[lang] for Mersenne Twister
View gist:5553335

This is wrong, Rust is not faster than GCC (but is sometimes faster than Clang), see this discussion

I implemented the Mersenne Twister random number generator in Rust, and then compared the Rust one with the fastest non-Rust one I could find (mt19937ar-cok.c on this page):

** Rust **

real    0m4.470s
user    0m4.444s
quisquous / gist:5167417
Last active Dec 14, 2015
How not to be scary (when teaching programming)
View gist:5167417
How not to be scary (when introducing programming)
A transcribed lightning talk given by Lyla Fischer at the PyCon 2013 Education Summit
What are people scared of? The main thing that people are scared of is that
they don't belong. The rest of my talk is mainly going to center on this one
I'm going to let you take 15 seconds to think of stereotypes of programmers.

Vagrant Setup

This tutorial guides you through creating your first Vagrant project.

We start with a generic Ubuntu VM, and use the Chef provisioning tool to:

  • install packages for vim, git
  • create user accounts, as specified in included JSON config files
  • install specified user dotfiles (.bashrc, .vimrc, etc) from a git repository

Afterwards, we'll see how easy it is to package our newly provisioned VM

piscisaureus /
Created Aug 13, 2012
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url =

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

ryin /
Last active May 1, 2021
bash script for installing tmux without root access
# Script for installing tmux on systems where you don't have root access.
# tmux will be installed in $HOME/local/bin.
# It's assumed that wget and a C/C++ compiler are installed.
# exit on error
set -e
alandipert / midi.clj
Created Mar 31, 2010
Play music with Clojure and javax.sound.midi
View midi.clj
(import '(javax.sound.midi MidiSystem Synthesizer))
(defn play-note [synth channel note-map]
(let [{:keys [note velocity duration]
:or {note 60
velocity 127
duration 1000}} note-map]
(. channel noteOn note velocity)
(Thread/sleep duration)
(. channel noteOff note)))