Skip to content

Instantly share code, notes, and snippets.

@xavierRiley
xavierRiley / hack.sh
Created April 25, 2012 07:15 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@xavierRiley
xavierRiley / my_template.rb
Created February 7, 2012 20:55 — forked from nesquena/my_template.rb
Kyan Custom Admin Template for Padrino
project :test => :rspec, :orm => :activerecord, :adapter => :postgres, :mock => :none, :script => :jquery, :renderer => :erb, :stylesheet => :none, :admin_renderer => :erb
# include additional generators
inject_into_file destination_root('config/boot.rb'), "\# include additional generators\nPadrino::Generators.load_paths << Padrino.root('generators', 'kyan_admin_page_generator.rb')\nPadrino::Generators.load_paths << Padrino.root('generators', 'kyan_admin_generator.rb')\n\n", :before => "Padrino.load!"
say "Cloning custom generators from git@github.com:xavierRiley/Kyan-Padrino-Admin-Generators.git", :red
remove_dir destination_root('generators')
run "git clone git@github.com:xavierRiley/Kyan-Padrino-Admin-Generators.git " + destination_root('generators')
#generate :model, "account username:string password:string"
@xavierRiley
xavierRiley / gist:1570253
Created January 6, 2012 11:49
Setting MIME type of images on S3 recursively using Fog gem
connection.directories.first.files.each {|file| if file.key.match(/jpg$/)
file.content_type = "image/jpg";
file.acl="public-read"
file.save
puts file.key
}; nil
}
@xavierRiley
xavierRiley / sample-vhosts.conf
Created January 5, 2012 16:39
Sample vhost for php sites
<VirtualHost *:80>
ServerName SITE_URL
ServerAlias SITE_IP *.SITE_URL
DocumentRoot /var/www/SITE_URL/PUBLIC_FOLDER
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
@xavierRiley
xavierRiley / rackspace-server-setup
Created November 18, 2011 16:28
Setting up nginx, unicorn, memcached, upstart on a Rackspace Cloud Ubunutu 10.04
http://brandontilley.com/2011/01/29/serving-rails-apps-with-rvm-nginx-unicorn-and-upstart.html
but ...
Rvm commands have changed slightly. Create a normal user first then;
http://beginrescueend.com/rvm/install/
Follow multi user install