Skip to content

Instantly share code, notes, and snippets.

View ashleyw's full-sized avatar
🎯
Focusing

Ashley Williams ashleyw

🎯
Focusing
View GitHub Profile
{
"id": 21441,
"description": "KENTUCKY FRIED CHICKEN, Fried Chicken, EXTRA CRISPY, Wing, meat and skin with breading",
"tags": ["KFC"],
"manufacturer": "Kentucky Fried Chicken",
"group": "Fast Foods",
"portions": [
{
"amount": 1,
"unit": "wing, with skin",
@ashleyw
ashleyw / irb3.rb
Created September 20, 2011 14:25 — forked from peterc/irb3.rb
irb3 - Run an IRB-esque prompt over multiple Ruby implementations at once using rbenv
#!/usr/bin/env ruby
# encoding: utf-8
# irb3 - Runs an IRB-esque prompt (but it's NOT really IRB!) over multiple
# versions of Ruby at once (using rbenv)
#
# By Peter Cooper, BSD licensed
#
# 1. Type in expressions and press enter.
# 2. Leave space on the end of lines to enter more lines.
require 'rubygems'
require 'slope_one'
user_data = {
"alice" => {
"squid" => 1,
"cuttlefish" => 0.5,
"octopus" => 0.2
},
@ashleyw
ashleyw / gist:1332340
Created November 2, 2011 00:03
MagLev with rbenv
# until @sstephenson pulls this: https://github.com/sstephenson/ruby-build/pull/85
git clone https://github.com/jc00ke/ruby-build
cd ruby-build
./install.sh
rbenv install maglev-1.0.0
ruby -v -e 'puts :a'
// ==UserScript==
// @name Pinboard
// @namespace pinboard.com
// @include https://pinboard.in*
// ==/UserScript==
var privates = document.getElementsByClassName("private");
for (i = 0; i < privates.length; i++) {
privates[i].className = "bookmark";
Oct 15 21:00:10 Ashleys-iMac kernel[0]: Wake reason: EHC1
Oct 15 21:00:10 Ashleys-iMac kernel[0]: /drv/ MacModule.cpp:298 powerStateWillChangeTo: flags=82 stateNumber=3
Oct 15 21:00:10 Ashleys-iMac kernel[0]: /drv/ MacModule.cpp:299 powerStateWillChangeTo: found flag=kIOPMPowerOn (2)
Oct 15 21:00:10 Ashleys-iMac kernel[0]: /drv/ MacModule.cpp:304 powerStateWillChangeTo: found flag=kIOPMRestartCapability (80)
Oct 15 21:00:10 Ashleys-iMac kernel[0]: /drv/ MacModule.cpp:298 powerStateDidChangeTo: flags=82 stateNumber=3
Oct 15 21:00:10 Ashleys-iMac kernel[0]: /drv/ MacModule.cpp:299 powerStateDidChangeTo: found flag=kIOPMPowerOn (2)
Oct 15 21:00:10 Ashleys-iMac kernel[0]: /drv/ MacModule.cpp:304 powerStateDidChangeTo: found flag=kIOPMRestartCapability (80)
Oct 15 21:00:10 Ashleys-iMac kernel[0]: Previous Sleep Cause: 5
Oct 15 21:00:10 Ashleys-iMac kernel[0]: The USB device HubDevice (Port 1 of Hub at 0xfd000000) may have caused a wake by issuing a remote wakeup (2)
20/04/2012 17:50:14 GMT
Assertion status system-wide:
ChargeInhibit 0
PreventUserIdleDisplaySleep 0
PreventUserIdleSystemSleep 0
NoRealPowerSources_debug 0
CPUBoundAssertion 0
EnableIdleSleep 1
PreventSystemSleep 0
DisableInflow 0
@ashleyw
ashleyw / gist:2471449
Created April 23, 2012 14:56
Building mruby w/ Emscripten
make -C mrblib --no-print-directory CC=/Users/ashley/Developer/emscripten/emcc LL=/Users/ashley/Developer/emscripten/emcc
make -C ../tools/mrbc --no-print-directory CC=/Users/ashley/Developer/emscripten/emcc LL=/Users/ashley/Developer/emscripten/emcc
/Users/ashley/Developer/emscripten/emcc -Wall -Werror-implicit-function-declaration -g -MMD -I../../src -I../../src/../include -c ../../src/../tools/mrbc/mrbc.c -o ../../src/../tools/mrbc/mrbc.o
clang: warning: argument unused during compilation: '-nostdinc++'
/Users/ashley/Developer/emscripten/emcc -Wall -Werror-implicit-function-declaration -g -MMD -I../../src -I../../src/../include -c ../../src/array.c -o ../../src/array.o
clang: warning: argument unused during compilation: '-nostdinc++'
../../src/array.c:922:9: warning: variable 'times' is uninitialized when used here [-Wuninitialized]
while(times--) {
^~~~~
../../src/array.c:916:16: note: initialize the variable 'times' to silence this warning
{
"absolute": true,
"item" : [
{ "text" : "", "value" : 123},
{ "text" : "", "value" : 123}
]
}
@ashleyw
ashleyw / gist:5944968
Last active December 19, 2015 10:59
Took a while to track this conflict down while trying to install RethinkDB...
% brew install boost (add --interactive to be able to view bootstrap.log!)
./bootstrap.sh --prefix=/usr/local/Cellar/boost/1.53.0 --libdir=/usr/local/Cellar/boost/1.53.0/lib --without-icu
-n Building Boost.Build engine with toolset darwin...
Failed to build Boost.Build build engine
Consult 'bootstrap.log' for more details
Fix, via https://github.com/mxcl/homebrew/issues/12457#issuecomment-5992798: