Skip to content

Instantly share code, notes, and snippets.

View postmodern's full-sized avatar
🚀
releasing new versions

Postmodern postmodern

🚀
releasing new versions
View GitHub Profile
@postmodern
postmodern / build_ruby19.sh
Created February 6, 2009 00:30
Simple shell script that downloads and installs Ruby 1.9.1 alongside 1.8
#!/bin/sh
PATCH=376
mkdir -p /usr/local/src && cd /usr/local/src
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-p$PATCH.tar.bz2
tar -xjvf ruby-1.9.1-p$PATCH.tar.bz2
cd ruby-1.9.1-p$PATCH
./configure --prefix=/usr --program-suffix=19 --enable-shared
make && make install
@postmodern
postmodern / framed.rb
Created December 3, 2008 23:29
Generates infinite iframes, also demonstrates why C fails
#!/usr/bin/env ruby
require 'rack'
class FrameD
CHARS = ('a'..'z').to_a
def random_path
(0..10).map { |i|
CHARS[rand(CHARS.length)]
#!/usr/bin/env ruby
#
# Name: reval.rb
# License: MIT
# Author: postmodern (postmodern.mod3 at gmail.com)
# Description:
#
# Re-evaluates a specified Ruby file whenever the file changes.
# Reval was inspired by Giles Bowkett's kickass talk on Archaeopteryx at
# RubyFringe 2008, where Giles used some mad Ruby to re-evaluate his