Skip to content

Instantly share code, notes, and snippets.

<span style="unicode-bidi:bidi-override; direction: rtl">moc.niamod@eman</span>
@JohnPlummer
JohnPlummer / .Gemfile
Created December 13, 2011 15:19
Rails 3.1 on Heroku, TLDR Version
source 'http://rubygems.org'
gem 'rails', '3.1.1'
gem 'thin'
gem 'pg'
# Gems used only for assets and not required
# in production environments by default.
@JohnPlummer
JohnPlummer / call_partial_1.rb
Created January 31, 2012 12:52
Optional Parameters in View Partials
render 'shared/events_table', events: @events, title: 'Your Events'
@JohnPlummer
JohnPlummer / error
Created February 14, 2012 22:07
Heroku and gemfile conditions
You are trying to install in deployment mode after changing
your Gemfile. Run `bundle install` elsewhere and add the
updated Gemfile.lock to version control.
You have deleted from the Gemfile:
* rb-fsevent
!
! Failed to install gems via Bundler.
!
! Heroku push rejected, failed to compile Ruby/rails app
heroku plugins:install https://github.com/heroku/heroku-labs.git
heroku labs:enable user_env_compile -a myapp
class HelloSbt {
def sayHello() = ""
}
@JohnPlummer
JohnPlummer / lock_osx.txt
Last active August 29, 2015 14:02
Lock OSX (but keep the account logged in.)
/System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -suspend
@JohnPlummer
JohnPlummer / reboot.txt
Created June 14, 2014 09:22
Cron job to reboot the system at 3:35am
sudo crontab -e
30 3 * * * /sbin/shutdown -r +5 "About to reboot!"
# mute startup chime
sudo nvram SystemAudioVolume=%80
# reenable startup chime.
sudo nvram -d SystemAudioVolume
<p>
email:
<script type="text/javascript">
// <![CDATA[
document.write(
"<n uers="znvygb:anzr@qbznva.pbz">".replace(/[a-zA-Z]/g, function(c){return String.fromCharCode((c<="Z"?90:122)>=(c=c.charCodeAt(0)+13)?c:c-26);}));
// ]]>
</script>
<span style="unicode-bidi:bidi-override; direction: rtl">moc.niamod@eman</span>
</a>