View gist:9069004
1
$ docker run -d -p 8181:80 -p 8125:8125/udp jayofdoom/trusty-graphite-standalone
View gist:8253474
1
sudo docker ps -a | grep Exit | awk '{print $1}' | sudo xargs docker rm
View node-and-npm-in-30-seconds.sh
1 2 3 4 5 6 7 8 9
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 https://npmjs.org/install.sh | sh
View devel.org

ert

(ert-deftest foo ()
  (assert nil))

Now: M-x ert RET foo RET

apropos

Emacs makes discovery easier.

View gist:6077554
1 2 3 4 5 6 7 8 9 10
require 'json'
require 'date'
 
# Embedders
 
def scalar
lambda { |x| x }
end
 
def date
View config.ru
1 2 3 4 5 6 7 8 9 10
require 'rack/stream'
 
use Rack::Stream
 
run lambda {|env|
stream = env['rack.stream']
 
stream.after_open do
times = 0
open("./moi_munnar_up.jpg", "rb") {|f|
View redis-server
1 2 3 4 5 6 7 8 9 10
Anil-Wadghules-MacBook-Pro:~ anil$ redis-server
[3933] 11 Jul 20:04:52.382 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
[3933] 11 Jul 20:04:52.384 * Max number of open files set to 10032
_._
_.-``__ ''-._
_.-`` `. `_. ''-._ Redis 2.6.14 (00000000/0) 64 bit
.-`` .-```. ```\/ _.,_ ''-._
( ' , .-` | `, ) Running in stand alone mode
|`-._`-...-` __...-.``-._|'` _.-'| Port: 6379
| `-._ `._ / _.-' | PID: 3933
View adapter.rb
1 2 3 4 5 6 7 8 9 10
# Example from http://www.takadevelop.com/2013/05/03/adapter-pattern-in-ruby/
# Adapter Design Pattern
 
# Abstract Duck
class Duck
def quack
end
 
def fly
end
View config
1 2 3
Host 35
ProxyCommand ssh near_ip nc distant_ip 22
User admin
View rubymotion_update.sh
1 2 3 4 5 6 7 8 9 10
anil.wadghule@Anil-Wadghule-Mac ~/Code/rubymotion/RubyMotionSamples/HelloGL[master]
jruby-1.6.7@sidekiq λ sudo motion update
Password:
Connecting to the server...
Downloading software update...
######################################################################## 100.0%
Installing software update...
Software update installed.
 
= RubyMotion 1.3 =
Something went wrong with that request. Please try again.