πΊπ¦
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
/** | |
* Inspect object in console.log as simple text | |
* instead of expandable object structure | |
* | |
* Usage(e.g.): | |
* inspectObj(screen); | |
* | |
**/ | |
function inspectObj(obj, indentLength) { |
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
#!/bin/bash | |
# by Sfate | |
# $1 artist | |
# $2 album | |
# $3 filename | |
# $4 title | |
# $5 track | |
# $6 file duration in XX:YY form | |
# $7 file duration, number of seconds |
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 'right_aws' | |
# aws credits | |
aws_access_key = { | |
:id => "your key goes here", | |
:secret => "your secret access key goes here" | |
} | |
# initialize new connection to amazon sqs broker | |
sqs = RightAws::SqsGen2.new(aws_access_key[:id], aws_access_key[:secret]) |
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
#!/bin/bash | |
# Call this script from a local git repo to set up a dropbox remote you can push and pull to | |
# I keep this script under ~/Dropbox/Public/.git/gitbox.sh | |
# Inspired from http://stackoverflow.com/questions/1960799/using-gitdropbox-together-effectively | |
PROJECT=$(basename `pwd`) | |
DROPBOX="$HOME/Dropbox/Public" | |
mkdir -p $DROPBOX/.git | |
pushd $DROPBOX/.git |
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
curl http://git.io/git-log-simplify.rb --create-dirs -Lo $HOME/bin/git-lg | |
chmod +x $HOME/bin/git-lg |
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 bash | |
curl https://s3.amazonaws.com/heroku-jvm-buildpack-vi/vim-7.3.tar.gz --output vim.tar.gz | |
mkdir vim && tar xzvf vim.tar.gz -C vim | |
export PATH=$PATH:/app/vim/bin |
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 'haml' | |
require 'haml/html' | |
require 'httparty' | |
module Jekyll | |
class SyntaxBlock < Liquid::Block | |
def initialize(tag_name, language, tokens) | |
super | |
@language = language | |
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
# Add this lines into your .bashrc | |
function rake { | |
bundle_exec 'rake' $@ | |
} | |
function rspec { | |
bundle_exec 'rspec' $@ | |
} |
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
module Where | |
class <<self | |
attr_accessor :editor | |
def is_proc(proc) | |
source_location(proc) | |
end | |
def is_method(klass, method_name) | |
source_location(klass.method(method_name)) |
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
# make and cd to a directory | |
function mcd { | |
mkdir -p "$@" | |
cd "$@" | |
} |
OlderNewer