Skip to content

Instantly share code, notes, and snippets.

View treeder's full-sized avatar
🥌

Travis Reeder treeder

🥌
View GitHub Profile
class InfiniteLoopWorker < SimpleWorker::Base
def run
worker = InfiniteLoopWorker.new
worker.queue
end
end
instance_id = `wget -q -O - http://169.254.169.254/latest/meta-data/instance-id`
puts 'instance_id=' + instance_id
@treeder
treeder / merge_gem_example.rb
Created March 26, 2011 20:18
Shows how to use merge_gems
require 'simple_worker'
class TwilioWorker < SimpleWorker::Base
# This is the magic function. It will also require 'twiliolib'
merge_gem 'twiliolib'
# You can also specify the version
# merge_gem 'twiliolib', '2.0.7'
attr_accessor :twilio_key, :twilio_secret
buf=<�_������admin.$cmdwhatsmyuri
Unknown element kind (0xEC)
map[]
buf=N÷���_�*you127.0.0.1:43862ok�?
Unknown element kind (0xC3)
map[]
buf=P�_������admin.$cmd)replSetGetStatusforShell
Unknown element kind (0xED)
map[]
buf=\ķ���_�8errmsgnot running with --replSetok
include $(GOROOT)/src/Make.inc
TARG=queue_mem
GOFILES:=queue_mem.go
include $(GOROOT)/src/Make.pkg
merge_gem 'sass'
# now override it
module Sass
module Version
def version
@@version = {
:major => 3,
:minor => 2,
@treeder
treeder / config.yml
Created July 8, 2011 00:55
Sample configuration gist
database:
adapter: mysql2
host: x.y.com
database: whatever
username: something
password: something else
simpleworker:
access_key: mykey
secret_key: secret
@treeder
treeder / app.js
Created January 28, 2012 00:46
IronMQ Client Code for Titanium Mobile Developers
//Then in the main "app.js" (or wherever) call it like this:
var HTTPironmq = require('iron_mq');
HTTPironmq.call({
paramsJSON : {
messages : [
{
"body": "This is my message 1.",
"timeout": 30,
@treeder
treeder / build.sh
Last active September 30, 2015 05:38
My new linux build script
# First run: sudo apt-get install git
# Then clone this gist.
# Then run build.sh
# basics
sudo apt-get install g++ libcurl3-dev curl build-essential libxml2-dev libxslt-dev git mercurial bzr mongodb-clients
# python-software-propertie​s, seems to already be there or something?
# Go - https://wiki.ubuntu.com/Go
mkdir $HOME/go
if defined? $abt_config
@config = $abt_config
return @config
end