Skip to content

Instantly share code, notes, and snippets.

View karthiks's full-sized avatar
😄
Playing with GraphQL

Karthik Sirasanagandla karthiks

😄
Playing with GraphQL
View GitHub Profile
@karthiks
karthiks / gist:3009692
Created June 28, 2012 07:34 — forked from michaeldauria/gist:2048022
Migrating from Copycopter to your own instance
Once you have your own instance of copycopter-server running, you need to do the following:
1. Create a new project and take note of its hostname and api key
2. Make sure you are on the latest version of the copycopter_client gem, at the time of this writing it is 2.0.0
3. Export the latest version of your published drafts:
$ RAILS_ENV=production bundle exec rake copycopter:export
@karthiks
karthiks / ideal ops.md
Created June 14, 2012 11:57 — forked from elmer/ideal ops.md
ideal ops checklist

In a perfect world, where things are done well, not just quickly, I would expect to find the following when joining the company:

Documentation

  • Accurate / up-to-date systems architecture diagram

  • Accurate / up-to-date network diagram

  • Out-of-hours support plan

  • Incident management plan

@karthiks
karthiks / gist:1858132
Created February 18, 2012 08:03 — forked from michaelfeathers/gist:1855765
Five lines that turn Ruby into a different language
class Object
def method_missing m, *args
Object.respond_to?(m, true) ? Object.send(m, self, *args) : super
end
end
@karthiks
karthiks / compile-ooo3.sh
Created November 28, 2011 11:59 — forked from shyam/compile-ooo3.sh
comping OpenOffice.org3 for headless mode operations ( like watermarking, pdf processing, etc., )
# tested on an EL5 based platform
yum -y install perl-Archive-Zip ant bison flex pam-devel cups-devel gperf libxslt-devel openldap-devel gstreamer-devel gstreamer-plugins-base-devel db4-devel unixODBC-devel xalan-j2 boost-devel unixODBC-devel qt-devel subversion autoconf automake gtk2-devel gcc-c++ gnome-vfs2-devel rpm-build expat-devel python-devel curl-devel gcc gcc-c++ java-1.6.0-openjdk-devel libIDL-devel libXaw-devel bison
wget https://raw.github.com/gist/1247669/88133c7c8da53d257c38ff73b161d116aed18c13/dot-screenrc -O ~/.screenrc
wget http://download.services.openoffice.org/files/stable/3.3.0/OOo_3.3.0_src_core.tar.bz2
wget http://download.services.openoffice.org/files/stable/3.3.0/OOo_3.3.0_src_system.tar.bz2
tar xjf OOo_3.3.0_src_core.tar.bz2
tar xjf OOo_3.3.0_src_system.tar.bz2
cd ~/OOO330_m20/
wget http://tools.openoffice.org/unowinreg_prebuild/680/unowinreg.dll -O ./external/unowinreg/unowinreg.dll
@karthiks
karthiks / pre-commit
Created October 27, 2011 03:28 — forked from holysugar/pre-commit
git pre-commit warning to trailing whitespaces
#!/bin/sh
function error() {
echo "'$1' has trailing spaces.\n" >&2
}
git diff --cached --name-only | (while read f; do
ERROR=0
if grep -n '[[:space:]]$' "$f" ; then
error $f
@karthiks
karthiks / rspec-syntax-cheat-sheet.rb
Created September 9, 2011 18:19 — forked from dnagir/rspec-syntax-cheat-sheet.rb
RSpec 2 syntax cheat sheet by example
# RSpec 2.0 syntax Cheet Sheet by http://ApproachE.com
# defining spec within a module will automatically pick Player::MovieList as a 'subject' (see below)
module Player
describe MovieList, "with optional description" do
it "is pending example, so that you can write ones quickly"
it "is already working example that we want to suspend from failing temporarily" do
pending("working on another feature that temporarily breaks this one")