Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am drbraden on github.
  • I am dbraden (https://keybase.io/dbraden) on keybase.
  • I have a public key ASDuvqLRRrVdhB-hNwksd2gvipRmuwobd7yk3MnQu1oXEAo

To claim this, I am signing this object:

@drbraden
drbraden / kill-sticky.js
Last active July 10, 2019 10:57 — forked from alisdair/kill-sticky.js
Kill sticky headers and re-enable scrolling
// Original gist from https://alisdair.mcdiarmid.org/kill-sticky-headers/ (thank you!)
// My only addition is re-enabling scrolling since some sites disable it while
// their pop-up is active.
// Just copy the below and paste it at http://mrcoles.com/bookmarklet/ to
// properly escape the string and create a convenient "this link" that can
// be dragged to the bookmark bar. A more advanced version, also written
// by Mr. Coles, is available on npm: npm -g install bookmarklet
var i, elements = document.querySelectorAll('body *');
for (i = 0; i < elements.length; i++) {
@drbraden
drbraden / go.rake
Created May 9, 2016 20:33 — forked from alediaferia/go.rake
A couple of rake tasks to handle Go projects deployment
namespace :go do
task :upload do
on release_roles :all do
upload! "#{repo_path}/#{fetch(:application)}", release_path
end
end
task :build do
run_locally do
within repo_path do
@drbraden
drbraden / git_local.rb
Created May 9, 2016 20:31 — forked from alediaferia/git_local.rb
Capistrano strategy for checking out git projects locally rather than on deployment destination machine
module LocalGitStrategy
def test
run_locally do
test " [ -f #{repo_path}/.git/HEAD ] "
end
end
def check
run_locally do
execute :git, :'ls-remote --heads', repo_url
@drbraden
drbraden / .muttrc
Created April 5, 2016 05:43 — forked from tubbo/.muttrc
##
## Email configuration.
##
# IMAP Connection
set imap_user = 'tomphoolery@me.com'
set imap_pass = 'youwish'
set spoolfile = 'imaps://imap.mail.me.com:993/INBOX'
set folder = 'imaps://imap.gmail.com:993'
@drbraden
drbraden / Envoy.blade.php
Last active November 21, 2015 11:19 — forked from boris-glumpler/Envoy.blade.php
Envoy file with deployment tasks
{{-- Define all our servers --}}
@servers(['staging' => '', 'production' => ''])
@setup
{{-- The timezone your servers run in --}}
$timezone = 'Europe/Amsterdam';
{{-- The base path where your deployments are sitting --}}
$path = '/var/www/site.com/htdocs';
@drbraden
drbraden / gist:6b7d455190976b16526f
Last active August 29, 2015 14:26
UnixBench run on CloudAtCost
Link to results: http://serverbear.com/benchmark/2015/08/05/8UqD6Mj04RlXNWOZ
# # # # # # # ##### ###### # # #### # #
# # ## # # # # # # # ## # # # # #
# # # # # # ## ##### ##### # # # # ######
# # # # # # ## # # # # # # # # #
# # # ## # # # # # # # ## # # # #
#### # # # # # ##### ###### # # #### # #
Version 5.1.3 Based on the Byte Magazine Unix Benchmark
@drbraden
drbraden / gist:d4a3a1caf09429d0b842
Last active August 29, 2015 14:25
Allow "jj" to exit insert mode in Atom (working as of 1.0.2)
# Slightly modified version created by rdlugosz at https://github.com/atom/vim-mode/issues/334#issuecomment-85603175
#keymap.cson
'atom-text-editor.vim-mode.insert-mode':
'j': 'exit-insert-mode-if-preceded-by-j'
#init.coffee
atom.commands.add 'atom-text-editor', 'exit-insert-mode-if-preceded-by-j': (e) ->
editor = @getModel()
pos = editor.getCursorBufferPosition()
range = [pos.traverse([0,-1]), pos]
@drbraden
drbraden / gist:84dd9b16652527ab952c
Last active August 29, 2015 14:18
Use a newer version of Postgres with dokku-alt
source: https://github.com/dokku-alt/dokku-alt/issues/234
This assumes a fresh install, so no data migration to complicate things.
From a comment by ayufan on 4/6/2015:
Ok. You have to add to /home/dokku/.dokkurc:
export POSTGRESQL_IMAGE=ayufan/dokku-alt-postgresql:9.3
@drbraden
drbraden / kernelklean.sh
Created December 13, 2014 12:12
kernelklean
dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d' | xargs sudo apt-get -y purge