sudo apt-get install python-pip libcairo2 python-cairo
pip install carbon
pip install whisper
pip install django
pip install django-tagging
pip install graphite-web
require "etc" | |
# Script used to launch servers, and track their status | |
groups = {} | |
pid = nil | |
uid = nil | |
ARGV.each do |argument| |
def g(n, center, amplitude, total, density) | |
Math.sinh(density*((n.to_f - total / 2.0))/(total/2.0))/Math.sinh(density) * amplitude + center | |
end | |
N = 30 | |
Density = 10 | |
prev_value = nil | |
(0..N).each do |n| | |
value = g(n, 35, 10, N, Density) | |
print "%3d %.4f" % [n, value] |
#Overview drip is an awesome command line tool that can be used to dramatically lower perceived JVM startup time. It does this by preloading an entirely new JVM process\instance and allowing you to simply use the preloaded environment. This has extraordinary results with jruby.
We reduced time to run rake environment
from 13 seconds to a mere 3.5 seconds. This is actually at or near MRI 1.9.3p327 (with falcon patch) speeds!
Adding a few addition jruby options will reduce startup time even further (down to 1.69 seconds).
#Install Drip Install drip if you haven't already (see https://github.com/flatland/drip)
// Steve Phillips / elimisteve | |
// 2013.01.03 | |
// Programming Challenge: Launch 4 threads, goroutines, coroutines, or whatever your language uses for concurrency, | |
// in addition to the main thread. In the first 3, add numbers together (see sample code below) and pass the results | |
// to the 4th thread. That 4th thread should receive the 3 results, add the numbers together, format the results as | |
// a string (see sample code), and pass the result back to `main` to be printed. | |
// | |
// Do this as succinctly and readably as possible. _Go!_ #golang #programming #concurrency #challenge | |
package main |
The following steps executed in order will;
package: myapp.foo.locales | |
en: | |
mailbox: | |
header: | |
title: "Your mailbox" | |
subtitle: "Read and send messages" | |
welcome: "Welcome %{user}!" | |
actions: |
#!/usr/bin/python | |
# | |
# Usage: python paste_img.py dest_file.png | |
# | |
# This program readd the image stored in the clipboard, and dumps it into a file | |
import gtk, pygtk | |
pygtk.require('2.0') | |
import sys |