Skip to content

Instantly share code, notes, and snippets.

@wulftone
wulftone / bitmask_helpers.rb
Created October 5, 2011 22:22
Extending String and Array with bitmask helpers
# Convert a number in a string to a different base (stolen from stackoverflow.com)
class String
def convert_base(from, to)
self.to_i(from).to_s(to)
end
end
# Convert an array to it's maximum value if it were representing binary and filled with 1's
class Array
def max_bitmask
@wulftone
wulftone / functions.php
Created April 9, 2010 19:35
An API extension for FX.php, the PHP interface to FileMaker Pro
<?php
/**
* This file is an extension for FX.php, the PHP interface to FileMaker Pro.
* It will make your life much easier for petty FileMaker tasks!
*
* It also includes a "deluxe nav bar" function which is just a glorified
* version of the normal page navigation bar for sets of records.
*
* Go to the Psych Department Wiki for the latest version of this class--