Skip to content

Instantly share code, notes, and snippets.


Tonći Galić Tuxified

View GitHub Profile
View gist:222607
# A simple script which will name a tab in iTerm
# usage:
# $ nametab New tab name
echo -ne "\033]0;"$@"\007"
jt /
Created Aug 23, 2011
Merge a forked gist

If someone forks a gist and you'd like to merge their changes. Do this:

  1. clone your repo, I use the name of the gist

     git clone git:// gist-1163142
  2. add a remote for the forked gist, I'm using the name of my fellow developer

     git remote add aaron git://
brandonb927 /
Last active Sep 30, 2022
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned.
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer)
# For Sierra or newer, see
# Alot of these configs have been taken from the various places
# on the web, most from here
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:

gnarmis / experiments.rb
Created Sep 21, 2012
Experimenting with bastardized functional-ness in Ruby
View experiments.rb
def defn name, &b
Object.send :define_method, name, &b
# this also works (surprisingly), albeit with a warning
# def defn name
# Object.send(:define_method, name)
# end
giuseppeg / fuzzbuzz.js
Last active Jul 6, 2022
FizzBuzz solution with just one comparison:Bitwise operations, using predefined 0-15 numbers masksource:
View fuzzbuzz.js
// FizzBuzz solution with one comparison:
// Bitwise operations, using predefined 0-15 numbers mask
// live demo:
// source:
var words = [undefined, "Fizz", "Buzz", "FizzBuzz"],
mask = 810092048, //11 00 00 01 00 10 01 00 00 01 10 00 01 00 00
c = 0;
michaelfairley /
Last active Jun 11, 2017
Makin' Games with Ruby
raydog / bullshit.js
Last active Jul 1, 2022
Bullshit as a Service
View bullshit.js
var E_PREFIX_RATE = 0.25;
// All of our word lists:
var _word_lists = {
verb : [
"implement", "utilize", "integrate", "streamline", "optimize", "evolve", "transform", "embrace",
"enable", "orchestrate", "leverage", "reinvent", "aggregate", "architect", "enhance", "incentivize",
"morph", "empower", "envisioneer", "monetize", "harness", "facilitate", "seize", "disintermediate",
View up.completion.bash
# Bash completion for `up` <>
local rx
local token=${COMP_WORDS[$COMP_CWORD]}
local IFS=$'\t'
local words=$(dirname `pwd` | tr / " ")
local nocasematchWasOff=0
staltz /
Last active Oct 4, 2022
The introduction to Reactive Programming you've been missing