Skip to content

Instantly share code, notes, and snippets.

View mrdoornbos's full-sized avatar

Michael Doornbos mrdoornbos

View GitHub Profile
class UserObserver < ActiveRecord::Observer
def after_create(user)
UserMailer.deliver_signup_notification(user)
end
def after_save(user)
UserMailer.deliver_activation(user) if user.recently_activated?
UserMailer.deliver_forgot_password(user) if user.recently_forgot_password?
UserMailer.deliver_reset_password(user) if user.recently_reset_password?
class UserObserver < ActiveRecord::Observer
def after_create(user)
UserMailer.deliver_signup_notification(user)
end
def after_save(user)
UserMailer.deliver_activation(user) if user.recently_activated?
UserMailer.deliver_forgot_password(user) if user.recently_forgot_password?
UserMailer.deliver_reset_password(user) if user.recently_reset_password?
has_attached_file :photo, :styles => { :thumb=> "100x100",:small => "150x150>" } ,
:url => "/images/show/:id/:style/",
:path => "#{RAILS_ROOT}/attachments/:class/:id/:style/:basename.:extension"
RAILS_GEM_VERSION = '2.1.0' unless defined? RAILS_GEM_VERSION
require File.join(File.dirname(__FILE__), 'boot')
Rails::Initializer.run do |config|
config.action_controller.session = {
:session_key => '_socroto_session',
:secret => 'd57a6a7fbe921516182810d4c1e3c0b0a3e966d2621a69a2c1e4416554a0e9cf5bbf20116e79a77a6b1fba47bab58b2a4d160987bd5fa2109b3b15f631c461ad'
}
end
yum install gcc kernel-devel
yum install libXtst-devel libXrender-devel
yum install xinetd
rpm -Uvh VMware-server-1.0.6-91891.i386.rpm
vmware-config.pl
#Ignore the Mac OS X .DS_Store files
.DS_Store
#Ignore user-specific settings
*.mode1v3
*.mode2v3
*.pbxuser
*.perspectivev3
#Ignore textmate build errors
hdiutil attach -nomount -noverify -noautofsck -stdinpass -debug MyImage.sparseimage
@mrdoornbos
mrdoornbos / gist:7570045
Created November 20, 2013 20:03
git aliases
alias gst='git status'
alias gl='git pull origin master'
alias gp='git push origin master'
alias gd='git diff | mate'
alias gc='git commit -v'
alias gca='git commit -v -a'
alias gb='git branch'
alias gba='git branch -a'
var Helper = {
getDeviceImageByStatus: function(status) {
switch (status) {
case "open":
// door_open
return Appery.getImagePath("door_open") + ".png";
case "closed":
//door_closed