This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// main app.js | |
var client = require('ranger').createClient('ROOM', | |
'SECRET'); | |
var timestamp = require('./timestamp').timestamp; | |
var getWeatherWrapper = require('./weather').getWeatherWrapper; | |
var showMap = require('./map').showMap; | |
var getTweets = require('./tweets').getTweets; | |
client.room(ROOMID, function(room) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RED=`echo -e '\033[01;31m'` | |
BLUE=`echo -e '\033[01;34m'` | |
GREEN=`echo -e '\033[01;32m'` | |
NORMAL=`echo -e '\033[00m'` | |
function is_git_dirty { | |
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] | |
} | |
function parse_git_branch { | |
if is_git_dirty |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# bash completion support for core Git. | |
# | |
# Copyright (C) 2006,2007 Shawn O. Pearce <spearce@spearce.org> | |
# Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/). | |
# Distributed under the GNU General Public License, version 2.0. | |
# | |
# The contained completion routines provide support for completing: | |
# | |
# *) local and remote branch names |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
log --pretty=format:\"%h %ad | %s%Cgreen%d%Creset [%Cblue%an%Creset]\" --graph --date=short --topo-order |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git log --diff-filter=D --summary | |
git checkout [commit_hash]^ deleted_file.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "rspec/core/formatters/base_text_formatter" | |
class ProgressWithNames < RSpec::Core::Formatters::BaseTextFormatter | |
def example_passed(example) | |
super(example) | |
output.print green(".") | |
end | |
def example_pending(example) | |
super(example) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git ls-remote --tags origin | awk '/^(.*)(\s+)(.*[a-z0-9])$/ {print ":" }' | xargs git push origin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wait_until do | |
page.evaluate_script('$.active') == 0 | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Hacky random image thumbnailer. | |
# by Peter Sobot, April 21, 2012 | |
# Based heavily on code by Michael Macias | |
# (https://gist.github.com/a54cd41137b678935c91) | |
require 'rmagick' | |
images = Dir.glob(ARGV[0] ? ARGV[0] | |
: '-default-input-paths-') | |
output_dir = (ARGV[1] ? ARGV[1] |
OlderNewer