Skip to content

Instantly share code, notes, and snippets.

View revathskumar's full-sized avatar

Revath S Kumar revathskumar

View GitHub Profile
#!/bin/bash
# Pull this file down, make it executable and run it with sudo
# wget https://gist.githubusercontent.com/bryanhunter/10380945/raw/build-erlang-17.0.sh
# chmod u+x build-erlang-17.0.sh
# sudo ./build-erlang-17.0.sh
if [ $(id -u) != "0" ]; then
echo "You must be the superuser to run this script" >&2
exit 1
fi
@revathskumar
revathskumar / index.haml
Last active August 29, 2015 14:07 — forked from mislav/index.haml
%h1&= title
%p Hello world
// This code just is not yet tested.
$.on("ajax:beforeSend", function(e, xhr, settings){
append = if settings.url.indexOf('?') == -1 then "?" else "&"
settings.url += append + "xhr=true"
});
gem install rails
gem install mongoid
gem install pg
gem install mysql
gem install compass
gem install sass
@revathskumar
revathskumar / introrx.md
Last active August 29, 2015 14:12 — forked from staltz/introrx.md

The introduction to Reactive Programming you've been missing

(by @andrestaltz)

So you're curious in learning this new thing called Reactive Programming, particularly its variant comprising of Rx, Bacon.js, RAC, and others.

Learning it is hard, even harder by the lack of good material. When I started, I tried looking for tutorials. I found only a handful of practical guides, but they just scratched the surface and never tackled the challenge of building the whole architecture around it. Library documentations often don't help when you're trying to understand some function. I mean, honestly, look at this:

Rx.Observable.prototype.flatMapLatest(selector, [thisArg])

Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence.

Hello Markdown

h2

h3

h4

#!/bin/bash
# Pull this file down, make it executable and run it with sudo
# wget https://gist.githubusercontent.com/bryanhunter/10380945/raw/build-erlang-17.0.sh
# chmod u+x build-erlang-17.0.sh
# sudo ./build-erlang-17.0.sh
if [ $(id -u) != "0" ]; then
echo "You must be the superuser to run this script" >&2
exit 1
fi
@revathskumar
revathskumar / deploy.sh
Last active August 29, 2015 14:20
PHP, Apache deployment setup
apt-get install -y build-essential git-core libyaml-dev
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
curl -L get.rvm.io | bash -s stable
source /home/lookup/.rvm/scripts/rvm
rvm reload
rvm install 2.2.2
gem install capistrano --no-ri --no-rdoc
<?php
class Service {
public function create() {
print "In service create\n";
//try {
$this->send();
//}
//catch(ServiceException $e) {
// print "catch service exception in create\n";
<?php
Class Api {
public static $log;
public static function setLogger($func) {
self::$log = &$func;
}
public static function errorLog($st) {