Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View chrismanderson's full-sized avatar

Chris Anderson chrismanderson

View GitHub Profile
@chrismanderson
chrismanderson / test_helper.rb
Last active February 1, 2018 21:43
test_helper
require 'simplecov'
SimpleCov::SourceFile.class_eval do
def project_filename
h = {}
4.times{ # maximum 4 times
GC.stat(h)
live_slots = h[:heap_live_slots] || h[:heap_live_slot]
old_objects = h[:old_objects] || h[:old_object]
remwb_unprotects = h[:remembered_wb_unprotected_objects] || h[:remembered_shady_object]
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Keybase proof

I hereby claim:

  • I am chrismanderson on github.
  • I am chrisanderson (https://keybase.io/chrisanderson) on keybase.
  • I have a public key ASDXPJfKo7uHPZ6p87PQto-y8eNTZmXgmmF3SGlIK69oAgo

To claim this, I am signing this object:

{
"swagger": "2.0",
"info": {
"version": "v2",
"title": "Wheniwork"
},
"host": "api.wheniwork.com",
"basePath": "/2",
"schemes": [
"https"
/Applications/Xcode.app/Contents/MacOS/Xcode </dev/null &>/dev/null &

Input JSON:

{
   "fleet":{
      "MVVSYUagG6":{
         "shift-end":"9:00",
         "shift-start":"0:00",
         "start-location":"depot"
      },

"LC0Ux5hmUR":{

@chrismanderson
chrismanderson / foo.jsonp
Last active August 29, 2015 14:09 — forked from tmcw/foo.jsonp
d3.jsonp.foo('Hello, World!');
int GetInt(void)
{
// try to get an int from user
while (true)
{
// get line of text, returning INT_MAX on failure
string line = GetString();
if (line == NULL)
{
return INT_MAX;
@chrismanderson
chrismanderson / thrift
Created October 5, 2013 00:01
thrift mavericks stack trace
→ cat /Users/chris/.rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/thrift-0.9.1/ext/gem_make.out
/Users/chris/.rbenv/versions/1.9.3-p448/bin/ruby extconf.rb
extconf.rb:25: Use RbConfig instead of obsolete and deprecated Config.
checking for strlcpy() in string.h... yes
creating Makefile
make
compiling binary_protocol_accelerated.c
compiling bytes.c
compiling compact_protocol.c