Skip to content

Instantly share code, notes, and snippets.

View igal's full-sized avatar

Igal Koshevoy igal

  • Pragmaticraft
  • Portland, Oregon, USA
View GitHub Profile
@igal
igal / gist:983749
Created May 20, 2011 20:39
Resque: possible way to add durability

Resque durability

Resque (https://github.com/defunkt/resque) is nice, but doesn't provide durability. When a worker "reserves" a job, it actually just pops it from the data store, which deletes the job. If anything happens to the worker after it pops the job, the job is lost forever. However, the author of Resque, defunkt, doesn't want reservation or retries added, and has rejected such patches in the past. Therefore, this may not be worth doing with Resque unless someone wants to maintain a fork of it forever.

Background

  1. https://github.com/defunkt/resque/issues/16 -- where defunkt writes "Resque is explicitly designed to never re-try jobs. Ever, under any circumstance." and "If you need jobs to never fail and never slip through the cracks due to failure you may want [something else]".
  2. https://github.com/defunkt/resque/issues/93 -- where defunkt write "Resque
@igal
igal / 99.pl
Created August 10, 2012 04:17 — forked from notbenh/99.pl
ben goofs off with 99 bottles ... now with moar minimalism.
#!/usr/bin/env perl
use strict;
use warnings;
use feature qw{say};
sub bottles() { sprintf qq{%s bottle%s of beer}
, $_ || 'No'
, $_==1 ? '' : 's';
}
sub store() { $_=99; qq{Go to the store, buy some more...\n}; }
@igal
igal / .bashrc_prompt.sh
Created August 28, 2012 06:59
Fancy, re-configurable prompt.
# The code below provides an elaborate system for composing custom prompts.
# Of these the `myprompt`, `devprompt` and `longprompt` are the most useful.
# Fancy, reconfigurable prompt.
multiprompt () {
parse_git_branch () {
if [[ -n $promptgit ]] && which git 2>&1 > /dev/null; then
ref=$(git symbolic-ref HEAD 2> /dev/null) || return 0
ref="${ref#refs/heads/}"
if [[ $ref != 'master' ]]; then
@igal
igal / .gitconfig
Created August 28, 2012 06:51
Git configuration
#---[ Includes ]--------------------------------------------------------
[include]
# Load private information from a separate file, e.g. name, email, global
# ignores, tokens, etc.
path = ~/.gitconfig.local
#---[ Settings ]--------------------------------------------------------
[core]
@igal
igal / gist:53855
Created January 28, 2009 07:29
.gitrc aliases for common git commands
# Aliases for common git commands. E.g., enter "git d" for "git diff"
# These settings live in the ~/.gitconfig file.
[alias]
b = branch
ba = branch -a
ci = commit
co = checkout
d = diff
dc = diff --cached
@igal
igal / .vimperatorrc.local.vim
Created March 11, 2010 21:19
My Vimperator configuration
"===[ Settings ]========================================================
" Autocomplete using Firefox Awesomebar subsystem
set complete=l
" Show completions as you type? '' waits for tab, 'auto' shows them immediately
set wildoptions=''
" Select the longest autocomplete match
set wildmode='list:full'
@igal
igal / Thunderbird 3 -- userChrome.css
Created February 7, 2010 00:14
Thunderbird 3 user interface tweaks for use on small screens
/* Thunderbird 3 user interface tweaks
* ===================================
*
* These changes improve Thunderbird's behavior on smaller screens. You should
* add these to your Thunderbird profile's "chrome/userChrome.css" file. You
* will probably need to create a directory and file.
*/
/* Show a dot for unstarred messages in the message listing so that it's easy
* to tell which messages have are starred.