Skip to content

Instantly share code, notes, and snippets.

Travis Tilley ttilley

Block or report user

Report or block ttilley

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:0c445044e1bf97778263


How To Get Answers

Ask your question and then be patient. Tell us what you want to happen, what is actually happening, and include any error messages you find:

  • Provide a scenario. "I am trying to do X, I do so by calling APIs W and Y, but Z happens instead. I see the following error messages:..."
  • Focus on the goal. Ask about what you're trying to achieve (the big story) rather than the specific technical detail that you believe is holding you back.
  • Don't solicit help. Don't say, "Does anyone here know about (for example) Protocol Extensions". Just ask your question.
  • Do your homework. Search the web before asking in-channel.
  • Be courteous Don't just paste Stack Overflow questions in-channel.
  • Remember the topic Refer questions about third party libraries to their developers.
srid / gist:2151665
Created Mar 21, 2012
building doozerd and doozer
View gist:2151665
# install go weekly to ~/go
hg clone go
hg up weekly
cd src && ./make.bash
export PATH=~/go/bin:$PATH
export GOROOT=~/go
# doozer client
cd $GOROOT/src/pkg/
jefftrull / main.cpp
Created Jan 9, 2012
Example of producer-consumer for Ruby interpreter with separate thread in C++
View main.cpp
// Example of running Ruby in a separate thread
// 2012-01-08 by Jeff Trull <>
#include <iostream>
#include <queue>
#include <string>
#include <set>
#include <boost/thread.hpp>
#include <boost/thread/mutex.hpp>
seanlilmateus / filesystem_events.rb
Created Oct 10, 2011
Handling Filesystem Events with GCD and Macruby
View filesystem_events.rb
framework 'Foundation'
include Dispatch
#``O_EVTONLY`` is defined as ``0x8000`` in the OS X header files.
# instead of RDONLY flag I use the O_EVTONLY flag to open() the file, otherwise we'll prevent the
# volume that the file is on from being unmounted.
O_EVTONLY = 0x8000
nolanw / fscript.rb
Last active Sep 26, 2015
Inject F-Script into any app on OS X 10.7 or 10.8. (Yet another F-Script Anywhere replacement.)
View fscript.rb
#!/usr/bin/env ruby
FSCRIPT_PATH = "/Library/Frameworks/FScript.framework"
if ARGV.empty?
puts "Usage: #{$0} process_name"
GDB = IO.popen("gdb", 'w')
View fsevents.rb
require "ffi"
class ULLEnum < FFI::Enum
def native_type
class MachMsgHeader < FFI::Struct
layout :bits, :uint, :size, :uint, :remote_port, :uint, :local_port, :uint, :reserved, :uint, :id, :int
guybrush /
Created May 6, 2011
a list of slides from nodeconf 2011
mattetti / fsevents.rb
Created Mar 18, 2011
FSEvents API implementation in MacRuby
View fsevents.rb
if RUBY_ENGINE == 'macruby'
framework 'CoreServices'
WATCHED_EXTS = "rb,builder,erb,nokogiri"
PASSENGER_RESTART_FILE = File.expand_path(File.join(File.dirname(__FILE__), "..", "tmp", "restart.txt"))
def modified_files(path)
Dir.glob("#{File.expand_path(path)}/*.{#{WATCHED_EXTS}}").map do |filename|
uhop /
Created Mar 14, 2011
Adding Dojo's rich editor to Django's Admin.
# Example how to add rich editor capabilities to your models in admin.
from django.contrib.admin import site, ModelAdmin
import models
# we define our resources to add to admin pages
class CommonMedia:
js = (
View caveatPatchor.js
As of version 1.1.2, Propane will load and execute the contents of
~Library/Application Support/Propane/unsupported/caveatPatchor.js
immediately following the execution of its own enhancer.js file.
You can use this mechanism to add your own customizations to Campfire
in Propane.
Below you'll find two customization examples.
You can’t perform that action at this time.