$rollout = Rollout.new(REDIS)
$rollout.define_group(:admin) do |user|
user.admin?
end
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some of my favorite bash tricks (most of these come straight from Emacs): | |
Of course, most of these will ONLY work when 'set -o emacs' | |
C-F Move to next character | |
C-B Move to previous character | |
C-A Jump to beginning of line (bol) | |
C-E Jump to end of line (eol) | |
M-B Jump to previous word | |
M-F Jump to next word |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'yajl/json_gem' | |
module AP | |
# a = AP::ParseData.new('/file.txt') | |
class ParseData | |
def initialize(file) | |
@file = file | |
@ap_scratch = [] | |
@final_results = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""""""""""""""""""""""" | |
" Useful maps | |
"""""""""""""""""""""""" | |
" Map <C-L> (redraw screen) to also turn off search highlighting until the | |
" next search | |
nnoremap <C-L> :nohl<CR><C-L> | |
" Don't use arrow keys | |
map <up> <nop> | |
map <down> <nop> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.fluid.dockBadge = ''; | |
setTimeout(updateDockBadge, 1000); | |
setTimeout(updateDockBadge, 3000); | |
setInterval(updateDockBadge, 5000); | |
function updateDockBadge() { | |
var newBadge = ''; | |
var res = findInboxAnchorMatchResult(); | |
if (res) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
#### | |
# based on https://gist.github.com/jeffery/1115504 | |
# Helper script to update the Last modified timestamp of files in a Git SCM | |
# Projects working Copy | |
# | |
# When you clone a Git repository, it sets the timestamp of all the files to the | |
# time when you cloned the repository. | |
# | |
# This becomes a problem when you want the cloned repository, which is part of a |