Skip to content

Instantly share code, notes, and snippets.

Please create a mixin which adds 'send_later' support to objects of the class it's included on.
Async#send_later( :method, *args )
Calling `send_later` on an object with the Async ducktype should cause the message to be executed asynchronously.
Your implementation should not rely on anything other than the Ruby standard library.
require 'resque_scheduler'
module Resque
module Failure
##
# Support for automatically retrying jobs after the fashion of
# Delayed::Job.
class AutoRetry < Base
extend Helpers
:syntax on
:autocmd FileType * set formatoptions=tcql ts=4 sw=2 nocindent comments&
:autocmd FileType c,cpp set formatoptions=croql ts=4 sw=4 cindent comments=sr:/*,mb:*,ex:*/,://
:autocmd FileType java set formatoptions=croql ts=4 sw=4 cindent comments=sr:/*,mb:*,ex:*/,://
:autocmd FileType make set noexpandtab
" Rackup files are Ruby
:autocmd BufRead,BufNewFile *.ru set sw=4 sts=4 et si ft=ruby nocompatible
" For Viki
:autocmd BufNewFile,BufRead *.viki set ft=viki nocompatible
Setting up chef-server-webui (0.8.14-1) ...
sed: file /tmp/tmp.MDGihUcFdX/tmp.DJDuHWdZlh line 1: unknown option to `s'
dpkg: error processing chef-server-webui (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
chef-server-webui
E: Sub-process /usr/bin/dpkg returned an error code (1)
1 Author: Casey Speer <casey@Casey-Speers-MacBook-Pro.local>
1 Author: Mark Erdmann <mark@crowdflower.com>
2 Author: Brian P O'Rourke <bpo@somnambulance.net>
2 Author: lukas Biewald <lbiewald@lukas-biewalds-macbook-pro.local>
3 Author: John <john@john-lap.(none)>
4 Author: Howie <howietl@gmail.com>
17 Author: Chris Van Pelt <vanpelt@gmail.com>
28 Author: Tyson Tate <tyson@doloreslabs.com>
# Lighter -- Campfire from the command line
# usage: ruby lighter.rb
require "rubygems"
require "tinder"
require "readline"
require "highline/import"
TOKEN="XXX"
SUBDOMAIN="XXX"
ROOM="XXX"
# This is a sample git configuration file for using git with TextMate.
#
# Simply save the contents of this file in a file called .gitconfig
# in your HOME directory.
#
# Be sure to change your name, email, and github username.
# Everything else can remain the same.
#
[user]
We're interested to see how you perform under pressure - so try to get through as many as you can. That said, this is not a strict pass/fail test, and we're more interested in good solutions than fast ones.
Instructions:
# ssh to `purgatory.doloreslabs.com` using the identity provided to you in-person. Your username is `virgil` - you have full sudo power.
# Copy the contents of this gist into a new *private* gist of your own. Add your answers and notes inline to your new gist.
# Don't worry about messing up our machine - this is a game.
# Feel free to use the web or anything else as a reference.
# Please take notes - we're interested in what you tried as much as what you did.
# You have 90 minutes - complete as many of the following as you can, in any order.
@bpo
bpo / gist:709210
Created November 21, 2010 22:17
detaching from tty?
vagrant@vagrantup:~$ cat test.sh
#! /bin/bash
sleep 20
vagrant@vagrantup:~$ ./test.sh &
[1] 10488
vagrant@vagrantup:~$ disown 10488
vagrant@vagrantup:~$ ps -a
PID TTY TIME CMD
10488 pts/0 00:00:00 test.sh
10489 pts/0 00:00:00 sleep
WARN: *****WARN:WARN: You must place your validation key in:WARN: /etc/chef/validation.pem
WARN: Before generating instance data with Knife!WARN:
WARN: *****