NOTE: This post now lives (and kept up to date) on my blog: http://hakunin.com/rails3-load-paths
Do nothing. All files in this dir are eager loaded in production and lazy loaded in development by default.
# to generate your dhparam.pem file, run in the terminal | |
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
NOTE: This post now lives (and kept up to date) on my blog: http://hakunin.com/rails3-load-paths
Do nothing. All files in this dir are eager loaded in production and lazy loaded in development by default.
#this program uses the Shunting Yard algorithm to transform infix expressions | |
# into postfix, and then an AST, which can then be easily evaluated. | |
#just run `python calc.py` and enjoy. enjoyment is optional and not included | |
# with the standard calc.py package, but for an extra $99.99 we can have a | |
# calc.py Premium Deluxe sent to you over the next 6-8 weeks, which may or may | |
# not increase your enjoyment of our calc.py product. | |
#for a list of operators supported and not supported (for isntance, the unary - | |
# is a ~) look below. | |
#TODO: handle parentheses. |
Having trouble installing the latest stable version of tmux?
I know, official package for your OS/distro is outdated and you just want the newest version of tmux.
Well, this script should save you some time with that.
;;; show-your-colours --- an HTTP server showing the current buffer fontified | |
;; Author: Wilfred Hughes <[email protected]> | |
;; Version: 0.1 | |
;; Package-Requires: ((s "1.3.0")) | |
;;; Commentary: | |
;; Allow others to see what you're editing in Emacs. For live | |
;; screencasts, or general Emacs advocacy. If you have multiple |
An example implementation of the self-pipe trick in Ruby, by Paul Annesley (found here: http://pastebin.com/1SZprwZm)
Further reading:
man 2 select
data:text/html, <style type="text/css">#e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div id="e"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("e");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script> |
#cribbed from http://vimeo.com/52569901 (Twilio carrier call origination moderation) | |
# The idea is that many fan-in queues can enqueue at any rate, but | |
# dequeue needs to happen in a rate-controlled manner without allowing | |
# any individual input queue to starve other queues. | |
# http://en.wikipedia.org/wiki/Leaky_bucket (second sense, "This version is referred to here as the leaky bucket as a queue.") | |
# | |
# requires: | |
# redis 2.6+ | |
# redis-py>=2.7.0 | |
# anyjson |
#!/usr/bin/env bash | |
repo=$1 | |
rm -fr /tmp/gpm \ | |
&& mkdir /tmp/gpm \ | |
&& cd /tmp/gpm \ | |
&& curl -#L https://github.com/$repo/tarball/master \ | |
| tar zx --strip 1 \ | |
&& make install |