Skip to content

Instantly share code, notes, and snippets.

@Neil-Aframe
Neil-Aframe / gist:6911efe026cef21db268
Created February 12, 2015 08:27
kernel panic #1 (on wake from hibernate)
Anonymous UUID: 013E67BB-7B94-0304-54EC-869176A46AA2
Thu Feb 12 08:21:17 2015
panic(cpu 0 caller 0xffffff800e486c46): "Hibernate restore error e00002eb"@/SourceCache/xnu/xnu-2422.115.10/iokit/Kernel/IOHibernateIO.cpp:3110
Backtrace (CPU 0), Frame : Return Address
0xffffff8119723ae0 : 0xffffff800e023139
0xffffff8119723b60 : 0xffffff800e486c46
0xffffff8119723c60 : 0xffffff800e0e6193
0xffffff8119723cc0 : 0xffffff7f8e639add
0xffffff8119723d00 : 0xffffff7f8e63d10f
@Neil-Aframe
Neil-Aframe / app.rb
Created March 14, 2013 13:25
Example, non-working, attempt to use nesteed mounts in Grape for DRY design with multiple paths to same resources
require "grape"
# Example attempt to do nested mounting. The real-world case is for a resource which can be
# addressed in multiple ways, and I want a DRY design where groups define the parameters to address
# an item, but the manipulations possible are the same, and defined by the http verb, so should be
# in one place (class Thing in this example to read a "thing" resource)
class Thing < Grape::API
get do
{ :message => 'You found the thing!' }
end
@Neil-Aframe
Neil-Aframe / gist:5029416
Created February 25, 2013 12:12
Rack Middleware Test example (tweaked to work for me)
class SampleMiddleware
def initialize(app)
@app = app
end
def call(env)
request = Rack::Request.new(env)
request.session['hello'] = 'world'
@app.call(env)
end
@Neil-Aframe
Neil-Aframe / app.rb
Created January 28, 2013 17:17
Grape. Issue 326 reproduction
require 'grape'
class ExamplePostBody < Grape::API
prefix 'api'
format :serializable_hash
rescue_from :all
default_error_formatter :json
resource :echo do
post do
@Neil-Aframe
Neil-Aframe / mod_xsendfile_mac.txt
Created November 16, 2012 10:44
Trying to compile mod_xsendfile on Mac
apxs -cia mod_xsendfile.c
/usr/share/apr-1/build-1/libtool --silent --mode=compile /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.8.xctoolchain/usr/bin/cc -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -I/usr/local/include -I/usr/include/apache2 -I/usr/include/apr-1 -I/usr/include/apr-1 -c -o mod_xsendfile.lo mod_xsendfile.c && touch mod_xsendfile.slo
env: /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.8.xctoolchain/usr/bin/cc: No such file or directory
apxs:Error: Command failed with rc=65536
.