Skip to content

Instantly share code, notes, and snippets.

View benhoskings's full-sized avatar

Ben Hoskings benhoskings

View GitHub Profile
@benhoskings
benhoskings / gist:6619930
Created September 19, 2013 07:00
Pushing specific git branches
git_current_branch() {
cat "$(git rev-parse --git-dir 2>/dev/null)/HEAD" | sed -e 's/^.*refs\/heads\///'
}
alias gpthis='gp origin $(git_current_branch)'
alias gpthis!='gp --set-upstream origin $(git_current_branch)'
{
"auto_complete_commit_on_tab": true,
"auto_complete_delay": 30,
"bold_folder_labels": true,
"caret_style": "wide",
"color_scheme": "Packages/User/Ben's Solarized (light).tmTheme",
"detect_indentation": false,
"detect_slow_plugins": false,
"dictionary": "Packages/Language - English/en_GB.dic",
"drag_text": false,
dep 'erb config', :src, :dest do
met? {
Babushka::Renderable.new(dest).from?(dependency.load_path.parent / src)
}
meet {
render_erb src, :to => dest
}
end
dep 'app' do
-- This works as I'd expect.
module Main where
main = do
name <- getContents
putStrLn $ "Hello, " ++ "Ben" ++ "!"
=> "Hello, Ben!"
> :type "Ben" -- [Char]
dep 'h', :path do
met? {
path.p.tapp.exists?
}
meet {
# install with apt
}
end
dep 'headers' do
@benhoskings
benhoskings / Senator Wyden's remarks.markdown
Last active December 20, 2015 04:09
Senator Wyden: Remarks As Prepared for Delivery for the Center for American Progress Event on NSA Surveillance

Thank you for having me this morning. The Center for American Progress and the noted privacy hawk John Podesta have long been pursuing thoughtful intelligence policy. Since opening your doors in 2003 you have been making the case that security and liberty are not mutually exclusive, and your work is well­known in my office and throughout Washington.

When the Patriot Act was last reauthorized, I stood on the floor of the United States Senate and said “I want to deliver a warning this afternoon. When the American people find out how their government has interpreted the Patriot Act, they are going to be stunned and they are going to be angry.” From my position on the Senate Intelligence Committee, I had seen government activities conducted under the umbrella of the Patriot Act that I knew would astonish most Americans. At the time, Senate rules about classified information barred me from giving any specifics of what I’d seen except to describe it as Secret Law ­­ a secret interpretation of the Patriot Act, issu

This just bit me in production and I'm incredibly unimpressed.

ids = [...] # A list of string ids I generated locally

s = Fog::Storage.new :provider => 'Rackspace', :rackspace_username => '...', :rackspace_api_key => '...'
d = s.directories.detect {|d| d.key == 'corkboard_transfers' }

That directory contained about 3900 files. ids has 19 entries, all of which matched:

@benhoskings
benhoskings / hack.sh
Last active December 19, 2015 09:19 — forked from erikh/hack.sh
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
dep 'toolbelt' do
requires [
'less.bin',
'curl.bin',
'bzip2.bin',
'patch.bin',
'htop.bin',
'atop.bin',
'python.bin',
'lsof.bin',
@benhoskings
benhoskings / gist:5704433
Created June 4, 2013 08:21
Preferences.sublime-settings
{
"auto_complete_commit_on_tab": true,
"auto_complete_delay": 30,
"bold_folder_labels": true,
"caret_style": "wide",
"color_scheme": "Packages/User/Ben's Solarized (light).tmTheme",
"detect_indentation": false,
"dictionary": "Packages/Language - English/en_GB.dic",
"drag_text": false,
"draw_white_space": "all",