Skip to content

Instantly share code, notes, and snippets.

View jfriedlaender's full-sized avatar

Joel Friedlaender jfriedlaender

View GitHub Profile
def my_method
something = "fdsfs ".strip!
end
@jfriedlaender
jfriedlaender / gist:4992243
Created February 20, 2013 02:30
Pusher code that doesn't work with Unicorn
def send_cool_event
Pusher["fancy-pants-channel"].trigger_async('cool-event', pants_json)
end
@jfriedlaender
jfriedlaender / gist:4992247
Created February 20, 2013 02:31
Pusher code that does work with Unicorn
def send_cool_event
Pusher["fancy-pants-channel"].trigger('cool-event', pants_json)
end
handle_asynchronously :send_cool_event
@jfriedlaender
jfriedlaender / heroku-app-commands.coffee
Created February 21, 2013 11:52
Restart your Heroku app with a Hubot script.
# Description:
# Ask Hubot to perform actions on Heroku
#
# Dependencies:
# None
#
# Configuration:
# None
#
# Commands:
@jfriedlaender
jfriedlaender / init-postgresql-boxen
Last active October 1, 2015 16:53
Start Postgresql for Boxen
/opt/boxen/homebrew/bin/postgres -p 15432 -D /opt/boxen/data/postgresql -r /opt/boxen/log/postgresql/server.log
@jfriedlaender
jfriedlaender / voicescript.js
Created July 15, 2016 01:29
If anyone is interested, I made a quick javascript snippet that can make your Zendesk header green when your Zendesk voice is turned on. This is mostly to help you remember to turn it off when you leave your computer. You need to get a browser plugin that executes custom javascript for a specific webpage. I used CJS for chrome when testing it. T…
$('body').on('click', '.ember-view.availability', function(){
setTimeout(function() {
if($('#voice-control').hasClass('off')) {
$('#branding_header').css('background-color', '');
} else {
$('#branding_header').css('background-color', 'green');
}
}, 1000);
});