Skip to content

Instantly share code, notes, and snippets.

View shreyas-satish's full-sized avatar

Shreyas Satish shreyas-satish

View GitHub Profile
@shreyas-satish
shreyas-satish / ror.md
Created August 3, 2012 13:12 — forked from ticktricktrack/ror.md
RoR dependencies

RoR setup instructions: I guess you already have XCode on your machine.

In general: avoid sudo where you can, with this setup you can install and run everything without sudo

homebrew

http://mxcl.github.com/homebrew/

here is a list of the packages on my machine

@shreyas-satish
shreyas-satish / gist:2915361
Created June 12, 2012 05:34
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (PC)

Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.

Editing

Ctrl+C copy current line (if no selection)
Ctrl+X cut current line (if no selection)
Ctrl+⇧+K delete line
Ctrl+↩ insert line after
@shreyas-satish
shreyas-satish / node-and-npm-in-30-seconds.sh
Created June 8, 2012 17:53 — forked from isaacs/node-and-npm-in-30-seconds.sh
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl http://npmjs.org/install.sh | sh
@shreyas-satish
shreyas-satish / Ubuntu rbenv
Created June 8, 2012 13:27 — forked from HatemMahmoud/Ubuntu rbenv
Installing Ruby 1.9.2 with OpenSSL on Ubuntu 11.04 using ruby-build and rbenv
# for more info: https://gist.github.com/1120938
require "money"
class Decorator < BasicObject
undef_method :==
def initialize(component)
@component = component
end
def method_missing(name, *args, &block)
@shreyas-satish
shreyas-satish / CSFeatures.md
Created June 5, 2012 03:51
coffeescript features

CoffeeScript Features

Probably not comprehensive, and in no particular order...

integer literal1Y
feature nameexampleinclude?
string interpolation“a#{b}”Y
assignmenta = bY
single-line comment# commentY
@shreyas-satish
shreyas-satish / software_abstractions.txt
Created May 27, 2012 07:37 — forked from ivanacostarubio/software_abstractions.txt
Build the right software abstractions.
"Pick the right ones, and programming will flow naturally from design;
modules will have small and simple interfaces; and new functionality will
more likely fit in without extensive reorganization.
Pick the wrong ones, and programming will be a series of nasty surprises:
interfaces will become baroque and clumsy as they are forced to accommodate
unanticipated interactions, and even the simplest of changes will be hard to make."
MIT Professor Daniel Jackson
@shreyas-satish
shreyas-satish / README.md
Created March 20, 2012 17:04 — forked from napcs/README.md
Deploying Rails to Linode

Deploying Rails to Linode

Installing Ruby Enterprise Edition, Apache, MySQL, and Passenger for deploying Rails 3.0 applications.

Get a Linode, and set it up with Ubuntu 10.04 LTS so that you have till April 2013 to get updates. Once the Linode is formatted, boot it and continue on.

Set up an 'A' record in your DNS, pointing to the IP of your Linode. I'm using demo.napcs.com here.

Initial setup

@shreyas-satish
shreyas-satish / README.md
Created March 8, 2012 16:13 — forked from netmute/README.md
Game of Life

Game of Life

An implementation of Conway's Game of Life in 140 characters of Ruby.

Author

Created by Simon Ernst (@sier).

@shreyas-satish
shreyas-satish / config.ru
Created February 29, 2012 17:41
Rails Lightweight Stack. Most of this is detailed on Crafting Rails Applications - http://pragprog.com/book/jvrails/crafting-rails-applications
# Run this file with `RAILS_ENV=production rackup -p 3000 -s thin`
# Be sure to have rails and thin installed.
require "rubygems"
require "rails"
# Let's load only action controller. If you want
# to use active record, just require it as well.
require "action_controller/railtie"
class MyApp < Rails::Application