Skip to content

Instantly share code, notes, and snippets.

View gdakram's full-sized avatar
😺

Shahrier Akram gdakram

😺
  • Slytrunk
  • Pacifica, CA
View GitHub Profile
# Author: Pieter Noordhuis
# Description: Simple demo to showcase Redis PubSub with EventMachine
#
# Update 7 Oct 2010:
# - This example does *not* appear to work with Chrome >=6.0. Apparently,
# the WebSocket protocol implementation in the cramp gem does not work
# well with Chrome's (newer) WebSocket implementation.
#
# Requirements:
# - rubygems: eventmachine, thin, cramp, sinatra, yajl-ruby
@gdakram
gdakram / yui-widget-structure.js
Created January 21, 2012 01:48 — forked from kara-ryli/yui-widget-structure.js
Basic YUI Widget Structure, commented up to work with yuidocs.
/* global YUI */
/**
* My Module's purpose
* @module my-module
* @requires base-build, widget
*/
YUI.add("my-module", function (Y) {
"use strict";
@gdakram
gdakram / Rails 2 Environment
Created May 16, 2011 17:58 — forked from laserlemon/Rails 2 Environment
Snow Leopard -- RVM, Homebrew, Git, Imagemagick
# Installs on Snow Leopard.
# Homebrew
ruby -e "$(curl -fsS http://gist.github.com/raw/323731/install_homebrew.rb)"
echo 'export PATH=/usr/local/bin:/usr/local/sbin:$PATH' >> ~/.bash_profile
# Close Terminal window.
# Git
brew install git
brew update
# Bash snippet to open new shells in most recently visited dir.
# Useful if you want to open a new terminal tab at the present
# tab's location.
#
# Put this in your .bashrc or whatever.
pathed_cd () {
if [ "$1" == "" ]; then
cd
else