Skip to content

Instantly share code, notes, and snippets.

View zakelfassi's full-sized avatar

zak elfassi zakelfassi

View GitHub Profile
@zakelfassi
zakelfassi / Heroku-migration.sh
Created October 23, 2013 05:44
Adding a new Heroku app fork.
git remote add forked git@heroku.com:NEW_APP_NAME.git
git remote rename heroku old
git remote rename forked heroku
git push heroku master
heroku labs:enable user-env-compile -a NEW_APP_NAME
@zakelfassi
zakelfassi / Rails-assets_sync-cheatsheet.rb
Created October 11, 2013 03:16
Rails S3 assets_sync configuration cheatsheet
# gemfile
gem 'asset_sync'
# application.rb
config.assets.initialize_on_precompile = true
config.assets.precompile += ['stuff.js', 'stuff.css']
# production.rb
config.assets.enabled = true
@zakelfassi
zakelfassi / set-font-size.js
Last active December 23, 2015 17:09
Do you ever feel the need to adjust the font-size of a page ? Just run this code in your Console (Chrome dev tools/Firebug/...) and select some text ! // note that this code was written under 60seconds just to read this post : http://lifehacker.com/a-scientific-guide-to-saying-no-1293242273 Chrome extension coming soon. Maybe.
(function() {
function setSelectedSize(s) {
var arr = document.getElementsByTagName(window.getSelection().baseNode.parentNode.tagName);
for(var i=0; i<arr.length; i++) {
arr[i].style.fontSize = "" + s + "px";
}
}
window.addEventListener("mouseup", function() {
if(window.getSelection().type == "Range") {