Skip to content

Instantly share code, notes, and snippets.

View gokulnath's full-sized avatar
🎯
Focusing

Gokulnath gokulnath

🎯
Focusing
View GitHub Profile

Keybase proof

I hereby claim:

  • I am gokulnath on github.
  • I am gokulnath (https://keybase.io/gokulnath) on keybase.
  • I have a public key whose fingerprint is 3B3F 48D1 70AE 1652 C884 BC78 AB1E AAE8 8798 F42A

To claim this, I am signing this object:

@gokulnath
gokulnath / route
Created June 2, 2015 05:40
routes
```
namespace :admin do
mount Logster::Web => "/logs"
end
```
@gokulnath
gokulnath / info
Created October 17, 2011 14:22
rvm info
dialmydoc@enterprise-dialmydoc:~$ rvm info
ruby-1.9.2-p180:
system:
uname: "Linux enterprise-dialmydoc 2.6.32-21-server #32-Ubuntu SMP Fri Apr 16 09:17:34 UTC 2010 x86_64 GNU/Linux"
bash: "/bin/bash => GNU bash, version 4.1.5(1)-release (x86_64-pc-linux-gnu)"
zsh: " => not installed"
rvm:
@gokulnath
gokulnath / ahn.db.connection
Created December 8, 2011 08:55
ahn db connection
DEBUG db: ESC[4;35;1mSQL (206.0ms)ESC[0m ESC[0mCOMMITESC[0m
DEBUG db: ESC[4;36;1mSQL (168.2ms)ESC[0m ESC[0;1mBEGINESC[0m
DEBUG db: ESC[4;35;1mSQL (147.5ms)ESC[0m ESC[0mCOMMITESC[0m
DEBUG agi: <<< 200 result=0
[Thu Dec 8 12:34:08 2011] Adhearsion::VoIP::Asterisk::AGI::Server::RubyServer 0.0.0.0:4573 client:60087 localhost<127.0.0.1> connect
DEBUG db: ESC[4;36;1mSQL (0.0ms)ESC[0m ESC[0;1mMysql::Error: Lost connection to MySQL server during query: BEGINESC[0m
[Thu Dec 8 12:34:08 2011] Adhearsion::VoIP::Asterisk::AGI::Server::RubyServer 0.0.0.0:4573 client:60088 localhost<127.0.0.1> connect
[Thu Dec 8 12:34:08 2011] Adhearsion::VoIP::Asterisk::AGI::Server::RubyServer 0.0.0.0:4573 client:60090 localhost<127.0.0.1> connect
DEBUG db: ESC[4;35;1mSQL (0.0ms)ESC[0m ESC[0mMysql::Error: MySQL server has gone away: COMMITESC[0m
https://player.fm/series/beats-rye-types
https://player.fm/series/one-universe-at-a-time
https://player.fm/series/the-skeptics-guide-38316
https://player.fm/series/slate-money
https://player.fm/series/the-math-dude-quick-and-dirty-tips-to-make-math-easier
https://player.fm/series/planet-money
https://player.fm/series/fwthinking
https://player.fm/series/the-story-collider-10557
https://player.fm/series/spilled-milk
https://player.fm/series/goggles-optional
def Sequencer(a, b, c)
i = 0
until a > c do
d[i] = a + b
a = a + b
i += 1
end
end
static VALUE
rb_str_each_line(int argc, VALUE *argv, VALUE str)
{
rb_encoding *enc;
VALUE rs;
unsigned int newline;
const char *p, *pend, *s, *ptr;
long len, rslen;
VALUE line;
int n;
@gokulnath
gokulnath / ahn listening port
Created February 28, 2012 05:53
adhearsion error
gokulnath@void:~/work/ivr/land-bank-ivr$ bundle exec ahn start .
/home/gokulnath/work/ivr/land-bank-ivr/config/startup.rb:34:in `block in <top (required)>': undefined method `listening_port=' for nil:NilClass (NoMethodError)
from /home/gokulnath/work/ivr/land-bank-ivr/vendor/bundle/ruby/1.9.1/gems/adhearsion-1.2.4/lib/adhearsion/initializer/configuration.rb:28:in `configure'
from /home/gokulnath/work/ivr/land-bank-ivr/config/startup.rb:3:in `<top (required)>'
from /home/gokulnath/work/ivr/land-bank-ivr/vendor/bundle/ruby/1.9.1/gems/adhearsion-1.2.4/lib/adhearsion/initializer.rb:272:in `load'
from /home/gokulnath/work/ivr/land-bank-ivr/vendor/bundle/ruby/1.9.1/gems/adhearsion-1.2.4/lib/adhearsion/initializer.rb:272:in `block in load_all_init_files'
from /home/gokulnath/work/ivr/land-bank-ivr/vendor/bundle/ruby/1.9.1/gems/adhearsion-1.2.4/lib/adhearsion/initializer.rb:272:in `each'
from /home/gokulnath/work/ivr/land-bank-ivr/vendor/bundle/ruby/1.9.1/gems/adhearsion-1.2.4/lib/adhearsion/initializer.rb:272:
@gokulnath
gokulnath / Gemfile
Created March 18, 2012 06:10
Rails Lightweight Stack. Most of this is detailed on Crafting Rails Applications - http://pragprog.com/book/jvrails/crafting-rails-applications
source :rubygems
# We are not loading Active Record, nor Active Resources etc.
# We can do this in any app by simply replacing the rails gem
# by the parts we want to use.
gem "actionpack", "~> 3.2"
gem "railties", "~> 3.2"
gem "tzinfo"
# Let's use thin
@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.
#