This is a brief and bare-bones guide to getting GHC 7.2 and the cabal-install
tool (the two basic things you'll need to do Haskell development) up and running
on a new Mac OS X 10.7 install.
The instructions given here worked for me, but YMMV.
Original Source: https://github.com/chneukirchen/styleguide | |
= Christian Neukirchen's Ruby Style Guide | |
You may not like all rules presented here, but they work very well for | |
me and have helped producing high quality code. Everyone is free to | |
code however they want, write and follow their own style guides, but | |
when you contribute to my code, please follow these rules: | |
#!/bin/bash | |
## MOVED TO https://github.com/sickill/git-dude | |
INTERVAL=30 | |
ICON_PATH=`pwd`/icon.png | |
export LC_ALL=C # make sure git talks english | |
while [ 1 ]; do | |
for dir_name in *; do |
require 'rubygems' | |
require 'data_mapper' | |
DataMapper.setup :default, 'sqlite::memory:' | |
class Book | |
include DataMapper::Resource | |
property :id, Serial | |
property :meta, Json |
replays last FIN-ACK in order to check if the other side correctly implements TIMED-WAIT. other side should be first to close the connection. with http this can be done in curl by forcing http/1.0 mode.
curl -0 -d 'lolol=lololol' http://TARGET/wtwtwt
tcpdump -S 'tcp port 80' -l | ./replayer.rb TARGET 80 YOUR_HOST_AS_APPEARS_IN_TCPDUMP
Example of it working and showing the other side correctly handling TIMED-WAIT:
root@midway:~# tcpdump -S 'tcp port 80' -l | ./replayer.rb 173.194.41.67 80 ip-10-250-157-181.eu-west-1.compute.internal
OMG IM RUNNING
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
description "nginx http daemon" | |
start on runlevel [2] | |
stop on runlevel [016] | |
console owner | |
exec /opt/nginx/sbin/nginx -c /opt/nginx/conf/nginx.conf -g "daemon off;" | |
respawn |
Thanks to Jason Roelofs for his article at http://jasonroelofs.com/2012/03/12/manage-and-monitor-resque-with-upstart-and-monit/ which got me most of the way there. |
brew install apple-gcc42 openssl libyaml libffi | |
xcode-select --install | |
export CC=/usr/local/bin/gcc-4.2 | |
export CFLAGS='-g -O2' | |
export RUBY_CONFIGURE_OPTS=--with-openssl-dir=`brew --prefix openssl` | |
export CONFIGURE_OPTS=--with-openssl-dir=`brew --prefix openssl` | |
# I had to edit the svn repo URL in /usr/local/Cellar/ruby-build/20160913/share/ruby-build/1.8.7-p375 and change the URL from http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8_7 to https://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8_7 | |
rbenv install 1.8.7-p375 |