Skip to content

Instantly share code, notes, and snippets.

View gokulnath's full-sized avatar
🎯
Focusing

Gokulnath gokulnath

🎯
Focusing
View GitHub Profile
@gokulnath
gokulnath / json
Created January 13, 2014 11:36
sample nginx_site
'nginx_site' => {
'sites' => [
{
'site_name' => 'gokulnath.in',
'listen' => '80',
'server_name' => 'gokulnath.in',
'root' => '/home/vagrant/deploy/gokul',
'passenger_ruby' => 'ruby-1.9.3-p194',
'passenger_base_uri' => %w(/resume /home),
'deny' => ['182.121.111.1', '131.122.111.111']
@gokulnath
gokulnath / trace
Created January 12, 2014 04:04
Trace on running rspec
╭─gokulnath@void ~/projects/bitbucket/rails_sample_app ‹following-users*›
╰─➤ bundle exec rspec spec
zsh: correct 'rspec' to '.rspec' [nyae]? n
DEPRECATION: Rspec is deprecated. Use RSpec instead. Called from /home/gokulnath/projects/bitbucket/rails_sample_app/spec/support/utilities.rb:3:in `<top (required)>'.
UserPages
signup
with invalid information
should not create a user
after submission with no data
@gokulnath
gokulnath / Earth
Created October 28, 2013 17:40
History
If you imagine the 4,500-billion-odd years of Earth's history compressed into a normal earthly day, then life begins very early, about 4A.M., with the rise of the first simple, single-celled organisms, but then advances no further for the next sixteen hours. Not until almost 8:30 in the evening, with the day five-sixths over, has Earth anything to show the universe but a restless skin of microbes. Then, finally, the first sea plants appear, followed twenty minutes later by the first jellyfish and the enigmatic Ediacaran fauna. At 9:04P.M. trilobites swim onto the scene, followed more or less immediately by the shapely creatures of the Burgess Shale. Just before 10P.M. plants begin to pop up on the land. Soon after, with less than two hours left in the day, the first land creatures follow.
Thanks to ten minutes or so of balmy weather, by 10:24 the Earth is covered in the great carboniferous forests whose residues give us all our coal, and the first winged insects are evident. Dinosaurs plod onto the scene ju
@gokulnath
gokulnath / test
Created August 30, 2013 06:38
test gist
test
@gokulnath
gokulnath / java-verbose.log
Created August 1, 2013 08:54
Verbose log when running war file.
$ java -jar -verbose my-app.war
[Opened /usr/lib/jvm/java-7-oracle/jre/lib/rt.jar]
[Loaded java.lang.Object from /usr/lib/jvm/java-7-oracle/jre/lib/rt.jar]
[Loaded java.io.Serializable from /usr/lib/jvm/java-7-oracle/jre/lib/rt.jar]
[Loaded java.lang.Comparable from /usr/lib/jvm/java-7-oracle/jre/lib/rt.jar]
[Loaded java.lang.CharSequence from /usr/lib/jvm/java-7-oracle/jre/lib/rt.jar]
[Loaded java.lang.String from /usr/lib/jvm/java-7-oracle/jre/lib/rt.jar]
[Loaded java.lang.reflect.GenericDeclaration from /usr/lib/jvm/java-7-oracle/jre/lib/rt.jar]
[Loaded java.lang.reflect.Type from /usr/lib/jvm/java-7-oracle/jre/lib/rt.jar]
[Loaded java.lang.reflect.AnnotatedElement from /usr/lib/jvm/java-7-oracle/jre/lib/rt.jar]
@gokulnath
gokulnath / java-verbose.log
Created August 1, 2013 08:54
Verbose log when running war file.
$ java -jar -verbose my-app.war
[Opened /usr/lib/jvm/java-7-oracle/jre/lib/rt.jar]
[Loaded java.lang.Object from /usr/lib/jvm/java-7-oracle/jre/lib/rt.jar]
[Loaded java.io.Serializable from /usr/lib/jvm/java-7-oracle/jre/lib/rt.jar]
[Loaded java.lang.Comparable from /usr/lib/jvm/java-7-oracle/jre/lib/rt.jar]
[Loaded java.lang.CharSequence from /usr/lib/jvm/java-7-oracle/jre/lib/rt.jar]
[Loaded java.lang.String from /usr/lib/jvm/java-7-oracle/jre/lib/rt.jar]
[Loaded java.lang.reflect.GenericDeclaration from /usr/lib/jvm/java-7-oracle/jre/lib/rt.jar]
[Loaded java.lang.reflect.Type from /usr/lib/jvm/java-7-oracle/jre/lib/rt.jar]
[Loaded java.lang.reflect.AnnotatedElement from /usr/lib/jvm/java-7-oracle/jre/lib/rt.jar]
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
Fetching gem metadata from http://rubygems.org/
Query List: ["eventmachine-tail", "rest-client", "guard-rspec", "simplecov", "metric_abc", "simplecov-rcov", "rdiscount", "savon", "fakeweb", "mobme_support", "rails", "rspec-rails", "httparty", "authlogic", "sqlite3", "sass", "peach", "bunny", "commander", "text-table", "jruby-openssl", "json-jruby", "statsd-ruby", "redis", "hiredis", "algorithms", "em-zeromq", "yajl-ruby", "thrift_client", "mysqlplus", "em-mysqlplus", "active_support", "goliath", "em-redis", "random-word-generator", "ruby-prof", "rbtrace", "command_line_reporter", "omniauth-oauth2", "bluecloth", "annoy", "sysinfo", "execjs", "less-rails", "libxml", "tenderlove-frex", "spicycode-rcov"]
Query Gemcutter Dependency Endpoint API: eventmachine-tail rest-client guard-rspec simplecov metric_abc simplecov-rcov rdiscount savon fakeweb mobme_support rails rspec-rails httparty authlogic sqlite3 sass peach bunny commander text-table jruby-openssl json-jruby statsd-ruby redis hiredis algorithms em-zeromq ya
@gokulnath
gokulnath / latency.txt
Created May 31, 2012 15:07 — 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
@gokulnath
gokulnath / gist:2102089
Created March 19, 2012 08:05 — 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 video url.
#
# Usage:
#
# giftube [youtube url] [minute:second] [duration]
#
# ex.
#