Skip to content

Instantly share code, notes, and snippets.

GoodMojo drbraden

View GitHub Profile
View keybase.md

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 Jul 10, 2019 — forked from alisdair/kill-sticky.js
Kill sticky headers and re-enable scrolling
View kill-sticky.js
// 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 — forked from alediaferia/go.rake
A couple of rake tasks to handle Go projects deployment
View go.rake
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 — forked from alediaferia/git_local.rb
Capistrano strategy for checking out git projects locally rather than on deployment destination machine
View git_local.rb
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
View .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 Nov 21, 2015 — forked from boris-glumpler/Envoy.blade.php
Envoy file with deployment tasks
View Envoy.blade.php
{{-- 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 Aug 29, 2015
UnixBench run on CloudAtCost
View gist:6b7d455190976b16526f
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 Aug 29, 2015
Allow "jj" to exit insert mode in Atom (working as of 1.0.2)
View gist:d4a3a1caf09429d0b842
# 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 Aug 29, 2015
Use a newer version of Postgres with dokku-alt
View gist:84dd9b16652527ab952c
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
View kernelklean.sh
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
You can’t perform that action at this time.