Skip to content

Instantly share code, notes, and snippets.

View jhsu's full-sized avatar
💀
compliant with future standards

Joe Hsu jhsu

💀
compliant with future standards
  • MineHub
  • New York, NY
  • X @jhsu
View GitHub Profile
@jhsu
jhsu / README.markdown
Created April 29, 2012 01:37
4_28_2012
/usr/local/bin/ctags --exclude=.git --exclude=log -R * ~/.rvm/gems/`rvm current`/*
@jhsu
jhsu / randomthumbs.rb
Created April 23, 2012 14:56 — forked from psobot/randomthumbs.rb
Random Image Thumbnailer
# 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]

git-hub

This script opens a url to the github commit page

Install

add to a folder in $PATH (ie, /usr/local/bin, or if you have ~/bin part of your path). If the current branch is tracking a remote branch that is on github:

git hub # outputs the url to the most recent commit and opens it in default browser (if the commit has been pushed)

git hub -2 # opens the url to the 2nd most recent commit

@jhsu
jhsu / gist:2292055
Created April 3, 2012 13:38 — forked from jrom/gist:1162348
Requeue failed resque jobs
(Resque::Failure.count-1).downto(0).each { |i| Resque::Failure.requeue(i) }
Resque::Failure.clear
Welcome to PulseAudio! Use "help" for usage information.
>>> Memory blocks currently allocated: 1, size: 63.9 KiB.
Memory blocks allocated during the whole lifetime: 1847, size: 5.4 MiB.
Memory blocks imported from other processes: 0, size: 0 B.
Memory blocks exported to other processes: 0, size: 0 B.
Total sample cache size: 0 B.
Default sample spec: s16le 2ch 44100Hz
Default channel map: front-left,front-right
Default sink name: alsa_output.pci-0000_00_1b.0.analog-stereo
Default source name: alsa_input.usb-M-Audio_Producer_USB-00-USB.analog-stereo
/* for domain: projects.amsapps.com */
#wrapper2{
overflow: hidden;
}
#sidebar, #main {
background: #E5EEF5;
}
#top-menu {
@jhsu
jhsu / 2012-3-20.markdown
Created March 21, 2012 17:17
WNY Ruby meetup notes for March-a-polooza

WNY Ruby March-a-palooza

'^`*.,*'^`*.,*'^`*.,*'^`*.,*'^`*.,*'^`*.                         
*'^`*.,*'^`*.,*'^`*.,*'^`*.,*'^`*.,*'^`*.,*'                     
,*'^`*.,*'^`*.,*'^`*.,*'^`*.,*'^`*.,*'^`*.,*'^`*         ,---/V\  <  RUBY!! )
.,*'^`*.,*'^`*.,*'^`*.,*'^`*.,*'^`*.,*'^`*.,*'^`*.,*    ~|__(o.o)
*.,*'^`*.,*'^`*.,*'^`*.,*'^`*.,*'^`*.,*'^`*.,*'^`*.,*'^`  UU  UU 

Start 7:30pm

Imagine if you are extended multiple job offers from different companies, and you are trying to decide which one you
will accept. Imagine that the way you go about this is that you write down the things that matter to you from most to
least and that you use 3-5 things at the top of that list to decide. Those are your decision drivers. What are they?

-- http://codercofounder.wordpress.com/2012/03/19/the-one-interview-question-i-always-ask/

@jhsu
jhsu / instructions.markdown
Created March 15, 2012 20:45
mac os x ctags

ctags tips

Install ctags

brew install ctags-exuberant

Index tags

While in the root of the project