Skip to content

Instantly share code, notes, and snippets.

View radar's full-sized avatar

Ryan Bigg radar

View GitHub Profile
@radar
radar / part 2?
Created February 5, 2018 04:02 — forked from anonymous/part 2?
totalprice=0
totalitemcount=0
laborcharge=0
discount= 0
totalgccount=0
%%{
machine rfc2822_header;
action mark {
@pos = p
}
action domain {
# We have to match 'foo . bar' per the tests and transform it into 'foo.bar'
@parts[:host] = data[@pos..p-1].delete(" ")
#!/bin/bash
apt-get update
apt-get install -y build-essential libssl-dev libncurses5-dev libreadline5-dev zlib1g-dev linux-headers-generic libsqlite3-dev
cd /tmp
wget http://repo.webbynode.com/ruby-1.9.2-p290_i386.deb
dpkg -i ruby-1.9.2-p290_i386.deb
rm ruby-1.9.2-p290_i386.deb
@romansklenar
romansklenar / Inflector.php
Created December 11, 2009 21:42
Ruby on Rails Inflector port to PHP
<?php
/**
* The Inflector transforms words from singular to plural, class names to table names, modularized class names to ones without, and class names to foreign keys.
* This solution is partitionaly based on Ruby on Rails ActiveSupport::Inflector (c) David Heinemeier Hansson. (http://rubyonrails.org), MIT license
* @see http://api.rubyonrails.org/classes/Inflector.html
*
* @author Roman Sklenář
* @copyright Copyright (c) 2009 Roman Sklenář (http://romansklenar.cz)