Skip to content

Instantly share code, notes, and snippets.

View hemanth's full-sized avatar
🐜
🧘‍♂️

Hemanth HM hemanth

🐜
🧘‍♂️
View GitHub Profile

New Machine

Here's what I do after I do a fresh install of Lion. Things are sorta grouped by type.

General Config

  1. Run Software Update
  2. Start downloading Xcode
  3. Disable auto-bright and turn brightness all the way up
  4. Enable mouse right click
@hemanth
hemanth / gitio
Created June 27, 2012 06:29 — forked from defunkt/gitio
Turn a github.com URL into a git.io URL.
#!/usr/bin/env ruby
# Usage: gitio URL [CODE]
#
# Turns a github.com URL
# into a git.io URL
#
# Copies the git.io URL to your clipboard.
url = ARGV[0]
code = ARGV[1]
@hemanth
hemanth / gist:3001972
Created June 27, 2012 06:30 — forked from marcel/gist:2100703
giftube – Generates an animated gif from a YouTube url.
#!/usr/bin/env ruby
# giftube – Generates an animated gif from a YouTube url.
#
# Usage:
#
# giftube [youtube url] [minute:second] [duration]
#
# ex.
#
@hemanth
hemanth / jsconf-eu-2011.md
Created June 27, 2012 06:34 — forked from mattpodwysocki/jsconf-eu-2011.md
JSConf.EU Slides
@hemanth
hemanth / html5.vim
Created June 27, 2012 06:35 — forked from rcmachado/html5.vim
Vim syntax file for HTML 5
" Vim syntax file
" Language: HTML (version 5)
" Maintainer: Rodrigo Machado <[email protected]>
" URL: http://gist.github.com/256840
" Last Change: 2010 Aug 26
" License: Public domain
" (but let me know if you liked it :) )
"
" Note: This file just adds the new tags from HTML 5
" and don't replace default html.vim syntax file
@hemanth
hemanth / stopwords.py
Created June 27, 2012 07:10 — forked from acrymble/stopwords.py
Python stopwords
stopwords = ['a', 'about', 'above', 'across', 'after', 'afterwards']
stopwords += ['again', 'against', 'all', 'almost', 'alone', 'along']
stopwords += ['already', 'also', 'although', 'always', 'am', 'among']
stopwords += ['amongst', 'amoungst', 'amount', 'an', 'and', 'another']
stopwords += ['any', 'anyhow', 'anyone', 'anything', 'anyway', 'anywhere']
stopwords += ['are', 'around', 'as', 'at', 'back', 'be', 'became']
stopwords += ['because', 'become', 'becomes', 'becoming', 'been']
stopwords += ['before', 'beforehand', 'behind', 'being', 'below']
stopwords += ['beside', 'besides', 'between', 'beyond', 'bill', 'both']
stopwords += ['bottom', 'but', 'by', 'call', 'can', 'cannot', 'cant']
@hemanth
hemanth / gist:3002180
Created June 27, 2012 07:13
Awesome Python libs
@hemanth
hemanth / gist:3010278
Created June 28, 2012 09:44
Create an array from Range in node
Array.prototype.range = function(str) {
var inclusive = str.indexOf("...") > -1;
var p = str.split( ((inclusive) ? "..." : "..") );
p[0] = parseInt(p[0]), p[1] = parseInt(p[1]) - (( inclusive ) ? 0 : 1);
var n = []; for ( var i=p[0]; i<=p[1]; i++ ) n.push(i); return n;
}
console.log( [].range("1...20") );
// prints