Skip to content

Instantly share code, notes, and snippets.

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

Hemanth HM hemanth

🐜
🧘‍♂️
View GitHub Profile
@hemanth
hemanth / DrupalToWordpress.java
Created May 10, 2012 10:50 — forked from azizur/DrupalToWordpress.java
Simple Drupal 6 to Wordpress 3 migrating class for the modeling-languages.com portal
/*
*
*
* Simple Drupal 6 to Wordpress 3 migrating class for the modeling-languages.com portal
*
*
* @version 0.1 10 June 2011
* @author Jordi Cabot
*
*
# Video: http://rubyhoedown2008.confreaks.com/08-chris-wanstrath-keynote.html
Hi everyone, I'm Chris Wanstrath.
When Jeremy asked me to come talk, I said yes. Hell yes. Immediately. But
then I took a few moments and thought, Wait, why? Why me? What am I supposed
to say that's interesting? Something about Ruby, perhaps. Maybe the
future of it. The future of something, at least. That sounds
keynote-y.
@hemanth
hemanth / latency.txt
Created May 31, 2012 17:08 — forked from jboner/latency.txt
Latency numbers every programmer should know
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns
Mutex lock/unlock 25 ns
Main memory reference 100 ns
Compress 1K bytes with Zippy 3,000 ns
Send 2K bytes over 1 Gbps network 20,000 ns
Read 1 MB sequentially from memory 250,000 ns
Round trip within same datacenter 500,000 ns
Disk seek 10,000,000 ns
@hemanth
hemanth / webdev.md
Created June 9, 2012 03:00 — forked from dideler/bootstrapping.md
Bootstrapping
@hemanth
hemanth / data-markdown.user.js
Created June 9, 2012 05:42 — forked from paulirish/data-markdown.user.js
*[data-markdown] - use markdown, sometimes, in your HTML
// ==UserScript==
// @name Use Markdown, sometimes, in your HTML.
// @author Paul Irish <http://paulirish.com/>
// @link http://git.io/data-markdown
// @match *
// ==/UserScript==
// If you're not using this as a userscript just delete from this line up. It's cool, homey.
node_modules/A/node_modules/B/node_modules/C/all.js
@hemanth
hemanth / Object.protectProperty.js
Created June 17, 2012 05:33
Protected properties using Name objects
// The following depends on a quirk in V8 to work.
// Depends on Map and WeakMap, which can be:
// * turned on in Chrome's about:flags
// * enabled in node using --harmony_collections or --harmony
// * shimmed via https://github.com/Benvie/ES6-Harmony-Collections-Shim
// Provides:
// * Name
// * Object.protectProperty
@hemanth
hemanth / Rakefile
Created June 18, 2012 17:56 — forked from JoshCheek/README.md
Challenge to create your own struct
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new :rspec do |t|
t.rspec_opts = ['--fail-fast', '--format', 'documentation']
end
task default: :rspec
@hemanth
hemanth / each.js
Created June 19, 2012 08:47 — forked from WebReflection/each.js
all you need to `each(obj, cb [,context])`
var each = function (Array) {"use strict";
/*! all you need to `each(obj, cb [,context])`
* @author WebReflection
* @license WTFPL - http://en.wikipedia.org/wiki/WTFPL
* @gist https://gist.github.com/2294934
*/
var
toString = {}.toString,
hasOwnProperty = {}.hasOwnProperty,
array = toString.call([]),
@hemanth
hemanth / README.md
Created June 25, 2012 02:06
Poor Man's Application Launcher

Why?

I'm in terminal a lot. Like, all the time. I thought it'd be cool to make my Terminal work like an application launcher.

What?

This just aliases every Application to a terminal command. Stripping out spaces and downcasing. For instance, running safari will do open -a Safari. Running activitymonitor will do open -a "Activity Monitor".

How?