Skip to content

Instantly share code, notes, and snippets.

View dennis-best's full-sized avatar

Dennis Best dennis-best

View GitHub Profile
@dennis-best
dennis-best / Jira ticket to branch name.applescript
Last active October 9, 2017 19:20
Create a branch name from a Jira ticket
-- This script will copy a specially formatted version of the current Chrome tab to your clipboard. For example, if you are viewing Jira ticket in Chrome, "sig-435-add-icons-to-abm-filter-panel" or "[SIG-435] Add icons to ABM filter panel" can be copied to the clipboard.
-- How to use: Save to ~/Library/Scripts folder and enable the AppleScript menu (launch Applications/Script Editor and go to settings) or download FastScripts (for more features including add hot keys).
tell application "Google Chrome"
if not (exists window 1) then return
set theTitle to the title of active tab of window 1
tell application "System Events"
namespace :db do
desc "Syncs local database with production"
task :sync do
puts 'Syncing local database with production...'
db_config = Rails.configuration.database_configuration
database_name = db_config['development']['database']
begin
`heroku pg:backups capture`
@dennis-best
dennis-best / broken-image-catcher.coffee
Created August 13, 2015 19:21
Broken image catcher
$(document).on 'page:change', ->
$('img').error ->
$(this).attr 'src', 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7'
$(this).addClass 'no-image'