Skip to content

Instantly share code, notes, and snippets.

View ambethia's full-sized avatar
🐼
PANDAS!

Jason L Perry ambethia

🐼
PANDAS!
View GitHub Profile
((rand().to_i)...rand((rand(5000).to_i))).send(Enumerable.instance_methods[rand(Enumerable.instance_methods.size)]) { rand(6) > 2 }
@burke
burke / 0-readme.md
Created January 27, 2012 13:44 — forked from funny-falcon/cumulative_performance.patch
ruby-1.9.3-p327 cumulative performance patch for rbenv

ruby-1.9.3-p327 cumulative performance patch for rbenv

This installs a patched ruby 1.9.3-p327 with various performance improvements and a backported COW-friendly GC, all courtesy of funny-falcon.

Requirements

You will also need a C Compiler. If you're on Linux, you probably already have one or know how to install one. On OS X, you should install XCode, and brew install autoconf using homebrew.

@ambethia
ambethia / life.rb
Last active February 4, 2022 18:05
My implementation of Conway's Game of Life
# Run this:
# ruby < <(curl -s https://gist.githubusercontent.com/ambethia/1429621/raw/life.rb)
require 'curses'
class Life
extend Curses
CELL_CHAR = "*"
@goatslacker
goatslacker / spaceship.coffee
Created October 7, 2011 08:01
creates an svg path for a spaceship based on Dave Bollinger's algorithm
# Based on Dave Bollinger`s work
class Spaceship
constructor: (@size = 5) ->
@ship = ( solid: [], cockpit: [], body: [] )
# map the ship
{ empty, solid, cockpit, body } = @map this
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAtq4sV9zglIqqkqCvhwdiOTZ2a6D3xhmBAJulHVLMrsD1QL0662R84iCi4VdMlvviKo1W0zk98pjvnQC4Q1KZJ1xmPPyq97pbZAipZR15MNqOS5R82Oo8+cpdQsJwdQBhA47OxpOKrju6AqxWg8Tz3m7Lda0iDa4woXNG8eMwIGCZ31iBFOMuz/aSWc92KZ3p6lqJw2C3H2H1h6291AfYRSnShF5wfYCQDjLupkhX6jq90u4cGcFrWJBgRPLs0Xkl4azNTlo4/dFMaI1jYI363K9ERk33tUsh4hqHTt8saDNo4+c+46Lv/5dmznsxkcei46yD9fTuB85pQMEFWILB0w== [email protected]
@ericboehs
ericboehs / Fresh-Install.markdown
Last active July 24, 2023 08:16
What I do after a fresh install of Mac OS X
@collegeman
collegeman / setup-statsd.sh
Created March 9, 2011 16:12
Turn an Ubuntu 10.04 linode into a StatsD/Graphite server
# install git
sudo apt-get install g++ curl libssl-dev apache2-utils
sudo apt-get install git-core
# download the Node source, compile and install it
git clone https://github.com/joyent/node.git
cd node
./configure
make
sudo make install
# install the Node package manager for later use
@mrinterweb
mrinterweb / update_chromium.sh
Created December 30, 2010 23:20
This is a script to update chromium to the nightly build for mac
#!/bin/bash
TMP_DIR=/tmp/chromedownload
BASE_URL=http://build.chromium.org/f/chromium/snapshots/chromium-rel-mac
rm -rf $TMP_DIR
mkdir $TMP_DIR
cd $TMP_DIR
curl $BASE_URL/LATEST -o $TMP_DIR/LATEST --silent && LATEST=`cat $TMP_DIR/LATEST`
echo "Latest build # $LATEST"
echo "downloading from: $BASE_URL/$LATEST/chrome-mac.zip"
curl $BASE_URL/$LATEST/chrome-mac.zip -o $TMP_DIR/chrome-mac.zip
@mislav
mislav / _notes.md
Created July 21, 2010 18:25
"livereload" server replacement for working with Rails

A replacement for "livereload" gem on OS X

This script is a replacement for livereload server component designed for working with Rails. It watches the filesystem with FS Events (Mac OS X) rather than with EventMachine. This is better for large projects for wich EventMachine fails with "too many open files" exception.

Sass is supported; .sass files can also be stored in "app/styles/" directory. Compass is detected if "config/compass.rb" file exists.

Installation:

Download this script to somewhere in your PATH and make it executable. You can name it something different than "livereload" if you want to try this and the official gem executable in parallel.

@mkdynamic
mkdynamic / bundles.sh
Created June 18, 2010 02:31
Install all of http://github.com/phuibonhoa's TM bundles (OS X only)
#!/usr/bin/env bash
#
# install all of http://github.com/phuibonhoa's TM bundles (OS X only)
#
echo "Installing bundles..."
# backup dir
if [ -d ~/desktop/_tm_bundle_backups ]; then rm -rf ~/desktop/_tm_bundle_backups; fi