Skip to content

Instantly share code, notes, and snippets.

View srid's full-sized avatar
🌤️
Never not this moment

Sridhar Ratnakumar srid

🌤️
Never not this moment
View GitHub Profile
sridharr@dhcp-22 ~/g/s/logyard> make dev-install
gofmt -w .
go install -tags zmq_3_x -v logyard/... github.com/ActiveState/tail/cmd/gotail
github.com/vmihailenco/bufio
github.com/ActiveState/log
# github.com/vmihailenco/bufio
can't create $WORK/github.com/vmihailenco/bufio/_obj/_go_.6: No such file or directory
github.com/alecthomas/gozmq
# github.com/ActiveState/log
can't create $WORK/github.com/ActiveState/log/_obj/_go_.6: No such file or directory
# This module provides a quick and dirty ruby interface to docker. The
# docker team promises to implement a properly ruby client library in
# the future. The docker API is not complete; see
# https://github.com/dotcloud/docker/issues/21
require 'open3'
# FIXME: replace IO.popen/backticks with the EM variants, although the
# docker commands below return instantaneously.
class Docker
diff --git a/go/goget.manifest b/go/goget.manifest
index 8a7687b..edb7bd5 100644
--- a/go/goget.manifest
+++ b/go/goget.manifest
@@ -6,13 +6,13 @@
# IMPORT_PATH VCS_TYPE REPO_URL [HEAD]
## doozer
-code.google.com/p/go.net/ hg http://mercurial.activestate.com/stackato-mirrors/go.net/ 3a318dc9
+code.google.com/p/go.net/ hg https://code.google.com/p/go.net/ 3a318dc9
$ curl -v localhost:3000
* About to connect() to localhost port 3000 (#0)
* Trying 127.0.0.1... connected
> GET / HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: localhost:3000
> Accept: */*
>
< HTTP/1.1 500 Internal Server Error
< Content-Type: text/html; charset=utf-8
$ bundle exec thin -p 3001 -V -l thin.log -D -e development start
>> Using rack adapter
REDIS_URL is redis://user:[email protected]:5004/
DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in R
ails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initi
alizers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has
-been-released. (called from <top (required)> at /app/app/config/environment.rb:5)
>> Thin web server (v1.5.0 codename Knife)
>> Debugging ON
>> Maximum connections set to 1024
$ bundle exec rails s Puma -p 3001 REDIS_URL is redis://user:[email protected]:5004/=> Booting Puma=> Rails 3.2.12 application starting in production on http://0.0.0.0:3001=> Call with -d to detach=> Ctrl-C to shutdown serverDEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initi
alizers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has
-been-released. (called from <top (required)> at /app/app/config/environment.rb:5)
Puma 1.6.3 starting...
* Min threads: 0, max threads: 16
* Environment: production
* Listening on tcp://0.0.0.0:3001
Started GET "/" for 127.0.0.1 at 2013-02-18 20:44:14 -0800
@srid
srid / fiber-leak.rb
Last active December 13, 2015 19:39
eventmachine fiber leak
require 'eventmachine'
require 'fiber'
DELAY = 1
def spawn_ops
Fiber.new { run_ops }.resume
end
def run_ops
@srid
srid / x.patch
Created February 15, 2013 18:43
commit 5d2220e75b2aee4b8f33404caa1374524c156478
Author: Sridhar Ratnakumar <[email protected]>
Date: Wed Feb 6 12:52:21 2013 -0800
Bug #97274 - enable postgresql HSTORE extension for all databases
diff --git a/postgresql/lib/postgresql_service/node.rb b/postgresql/lib/postgresql_service/node.rb
index 63ba035..ae39144 100644
--- a/postgresql/lib/postgresql_service/node.rb
+++ b/postgresql/lib/postgresql_service/node.rb
[2013-02-14 14:59:10.543351] fence - pid=13536 tid=d8d2 fid=50ea DEBUG -- container 427379834b9eafff6f28f75cff209701 - allocated IP 192.168.3.62
*** buffer overflow detected ***: /opt/rubies/current/bin/ruby terminated
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(__fortify_fail+0x37)[0x7f810c29f807]
/lib/x86_64-linux-gnu/libc.so.6(+0x109700)[0x7f810c29e700]
/lib/x86_64-linux-gnu/libc.so.6(+0x10a7be)[0x7f810c29f7be]
/opt/rubies/current/bin/ruby(rb_fd_set+0x19)[0x4bdb6c]
/opt/rubies/current/bin/ruby[0x42a097]
/opt/rubies/current/bin/ruby(rb_ensure+0x7c)[0x417047]
/opt/rubies/current/bin/ruby[0x424b0b]
@srid
srid / x.diff
Created January 17, 2013 17:49
diff --git a/cloud_controller/db/schema.rb b/cloud_controller/db/schema.rb
index 81b0e25..602e6b2 100644
--- a/cloud_controller/db/schema.rb
+++ b/cloud_controller/db/schema.rb
@@ -1,3 +1,4 @@
+# encoding: UTF-8
# This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
@@ -10,7 +11,7 @@