Skip to content

Instantly share code, notes, and snippets.

View andyfowler's full-sized avatar

Andy Fowler andyfowler

View GitHub Profile
# import a directory into a case-sensitive DMG
dir="/Users/afowler/src/stuff"
hdiutil create -srcfolder "${dir}" -autostretch -fs JHFS+X temp.dmg
hdiutil attach -mountpoint "${dir}-caseSensitive" temp.dmg
# JHFS+X == journalled, case-sensitive.
# DMG is initially the directory size, but can grow as needed
var className = 'Graph' + type;
// lesser of two uglies?
var graph = new window[className](this);
// versus
var graph = eval('new ' + className + '(this)');
// using window makes sanity checking easier:
if (typeof window[className] === 'function') // instantiate ...
DeflateFilterNote Input input_info
DeflateFilterNote Output output_info
DeflateFilterNote Ratio ratio_info
LogFormat '"%r" %{output_info}n/%{input_info}n (%{ratio_info}n%%)' deflate
CustomLog "logs/deflate_log" deflate
(a poem my little brother posted on his facebook)
I long every day just to see you
Just to talk to you
you don't have to be there boyfriend or girlfriend but always being
there for somone to talk and to listen
Love is amazing
Love is forever
Love is just being a friend
Love is careing
afowler@owlhouse en $ port installed
The following ports are currently installed:
apache2 @2.2.14_0+darwin+preforkmpm (active)
apr @1.3.9_0 (active)
apr-util @1.3.9_0 (active)
aquaterm @1.0.1_5 (active)
autoconf @2.65_0 (active)
autoconf213 @2.13_1 (active)
automake @1.11.1_0 (active)
bash-completion @1.1_2 (active)
#!/usr/bin/env ruby -wKU
def UBER_ip_route_match(command, regex)
command.split("\n").select { |l| l =~ regex }.first.to_s[/([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)/] || '0.0.0.0'
end
c = '10.128.0.0/24 dev eth1 proto kernel scope link src 10.128.0.48
127.0.0.0/8 dev lo scope link
default via 10.128.0.254 dev eth1'
# c = %x{/sbin/ip route list match #{ip}}
// creates a ticket with a reference to this revision, file, line # and author
// by default, the ticket is assigned to the author who committed it
$temporaryCode = 'hack'; // @TODO Add official code when x module completed....
// optionally assign the ticket to somebody else
$temporaryCode = 'hack'; // @TODO (jsmith@nutshell.com) Figure out the best way to handle this
// looks for references to other tickets to add dependencies
$temporaryCode = 'hack'; // @TODO Can't fix this until #207 is resolved

Now I'm Trapped Here

  • MacPorts
  • QuickSilver
  • TextMate
  • Xcode
@andyfowler
andyfowler / merge_post.feature
Created May 23, 2014 20:00
Nutshell REST API merge spec
Feature: Merging entities
Background:
Given a Nutshell with an account
@wip
Scenario: Basic JSON API compliance
When the client requests POST /accounts/1-accounts/merge with the body:
"""
{"accounts": ["336-accounts","337-accounts"] }
$response = $aboutmeApi->get();
$response->getPage(); // returns `Aboutme_Page` created from API response JSON
// no API consumer needs to know about AboutMe's API structure, only your own implemented methods.
$page->getFirstName();
$page->getBio();
// in testing
$page = Aboutme_Page::createFromResponse($yourfixture);