Skip to content

Instantly share code, notes, and snippets.

View okiess's full-sized avatar

Oliver Kiessler okiess

View GitHub Profile
@okiess
okiess / date_field.rb
Created September 20, 2008 14:33 — forked from jamie/date_field.rb
module Merb::Helpers::Form
# Available options known from rails:
# :use_month_numbers
# :default
# :order => [:day, :month, :year]
# :start_year
# :end_year
# :include_blank
def date_field(*args)
if bound?(*args)
#!/bin/sh
rm -rf src
git rm -rf bin
thor merb:edge:core
thor merb:tasks:setup
bin/thor merb:edge:more
bin/thor merb:edge:plugins
en:
date:
formats:
default: "%Y-%m-%d"
short: "%e %b"
long: "%B %e, %Y"
only_day: "%e"
day_names: [Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday]
abbr_day_names: [Sun, Mon, Tue, Wed, Thu, Fri, Sat]
de:
date:
formats:
default: "%d.%m.%Y"
short: "%e. %b"
long: "%e. %B %Y"
day_names: [Sonntag, Montag, Dienstag, Mittwoch, Donnerstag, Freitag, Samstag]
abbr_day_names: [So, Mo, Di, Mi, Do, Fr, Sa]
month_names: [~, Januar, Februar, März, April, Mai, Juni, Juli, August, September, Oktober, November, Dezember]
#!/bin/bash
adduser deploy
mkdir /home/deploy/.ssh
cp /root/.ssh/authorized_keys /home/deploy/.ssh
chmod 700 /home/deploy/.ssh
chmod 600 /home/deploy/.ssh/authorized_keys
chown -R deploy:deploy /home/deploy
apt-get update && apt-get install sudo
echo "deploy ALL=NOPASSWD: ALL" >> /etc/sudoers
sudo -u deploy ssh-keygen
############## plugin commands #################
plugin 'will_paginate', :git => 'git://github.com/mislav/will_paginate.git'
plugin 'factory_girl', :git => "git://github.com/thoughtbot/factory_girl.git"
plugin 'attachment_fu', :git => "git://github.com/technoweenie/attachment_fu.git"
plugin 'live_validations', :git => 'git://github.com/augustl/live-validations.git'
plugin 'new_relic', :git => 'git://github.com/newrelic/rpm.git'
plugin 'localized_dates', :git => 'git://github.com/clemens/localized_dates.git'
plugin 'pacecar', :git => 'git://github.com/thoughtbot/pacecar.git'
plugin 'shoulda', :git => 'git://github.com/thoughtbot/shoulda.git'
$ bin/thor merb:gem:install do_sqlite3
Installing 1 gem...
This may take a while...
Installing do_sqlite3...
Building native extensions. This could take a while...
Failed to install gem 'do_sqlite3 (any version)' (ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb
checking for sqlite3.h... no
*** extconf.rb failed ***
# mongo_template.rb
# fork of Ben Scofield's Rails MongoMapper Template (http://gist.github.com/181842)
#
# To use:
# rails project_name -m http://gist.github.com/gists/219223.txt
# remove unneeded defaults
run "rm public/index.html"
run "rm public/images/rails.png"
@okiess
okiess / rails3_bundler_template.rb
Created January 4, 2010 14:44
Rails3 Pre with Bundler Rails Template
############## commands #################
run "touch tmp/.gitignore log/.gitignore vendor/.gitignore"
run %{find . -type d -empty | grep -v "vendor" | grep -v ".git" | grep -v "tmp" | xargs -I xxx touch xxx/.gitignore}
run "rm .gitignore"
file '.gitignore', <<-ENDEND
.DS_Store
log/*.log
tmp/**/*
config/database.yml
We couldn’t find that file to show.