Skip to content

Instantly share code, notes, and snippets.

View dennisreimann's full-sized avatar
still hungry. still foolish.

d11n dennisreimann

still hungry. still foolish.
View GitHub Profile
@dennisreimann
dennisreimann / mail.rb
Created October 6, 2010 12:50
CIJoe mail notification script.
#!/usr/bin/env ruby
# CIJoe mail notification script.
# Some things in here are shamelessly ripped from
# http://gist.github.com/374030
#
# Call this from your hooks (build-worked, build-failed) with something like:
# ~/ci/scripts/mail.rb ~/ci/PROJECT/ CIJOE_URL BRANCH
#
# Requirements
SELECT CONCAT(permission_id, "-", role_id) AS identifier, COUNT(role_id) AS count
FROM permissions_roles
GROUP BY identifier
HAVING count > 1
ORDER BY count;
@dennisreimann
dennisreimann / ci.rake
Created October 19, 2010 12:46
Rake task for performing a build
namespace :ci do
desc "Run all required tasks to perform our build"
task :build do
RAILS_ENV = ENV['RAILS_ENV'] = 'test'
sh "bundle --quiet"
Rake::Task["db:migrate"].invoke
Rake::Task["db:test:prepare"].invoke
Rake::Task["db:seed"].invoke
Rake::Task["spec"].invoke
RAILS_ENV = ENV['RAILS_ENV'] = 'cucumber'
@dennisreimann
dennisreimann / simple_form.de.yml
Created February 28, 2011 20:55
German locale file for the simple_form gem
de:
simple_form:
"yes": 'Ja'
"no": 'Nein'
required:
text: 'erfordert'
mark: '*'
error_notification:
default_message: "Es gab folgende Fehler:"
@dennisreimann
dennisreimann / responders.de.yml
Created February 28, 2011 20:55
German locale file for the responders gem
de:
flash:
actions:
create:
notice: "%{resource_name} wurde erfolgreich gespeichert."
update:
notice: "%{resource_name} wurde erfolgreich bearbeitet."
destroy:
notice: "%{resource_name} wurde erfolgreich gelöscht."
alert: "%{resource_name} konnte nicht gelöscht werden."
@dennisreimann
dennisreimann / devise.de.yml
Created February 28, 2011 20:59
German locale file for the devise gem
de:
errors:
messages:
not_found: "nicht gefunden"
already_confirmed: "wurde bereits bestätigt"
not_locked: "war nicht gesperrt"
devise:
omniauth_callbacks:
success: 'Sie wurden erfolgreich eingeloggt.'
@dennisreimann
dennisreimann / rails-app-template.rb
Created February 28, 2011 22:37
My template for generating new rails apps
# Helpers
def git_update(message)
git :add => ".", :commit => "-m '#{message}'"
end
def git_remove(file)
git :rm => file
end
@dennisreimann
dennisreimann / manual_passenger_nginx.sh
Created December 6, 2011 13:57
Manual Nginx installation via Passenger
# download and untar nginx
wget -O /tmp/nginx.tar.gz http://www.nginx.org/download/nginx-1.0.11.tar.gz
tar xzvf /tmp/nginx.tar.gz
rm /tmp/nginx.tar.gz
# download and untar extra modules
wget -O /tmp/nginx-echo-module.tar.gz https://github.com/agentzh/echo-nginx-module/tarball/v0.38rc1
tar xzvf /tmp/nginx-echo-module.tar.gz
rm /tmp/nginx-echo-module.tar.gz
@dennisreimann
dennisreimann / my.zsh-theme
Created March 22, 2012 21:44
My ZSH theme, mix of various other themes, standing on the shoulders of clever people
autoload -U colors && colors
autoload -Uz vcs_info
zstyle ':vcs_info:*' stagedstr '%F{green}●'
zstyle ':vcs_info:*' unstagedstr '%F{yellow}●'
zstyle ':vcs_info:*' check-for-changes true
zstyle ':vcs_info:*' enable git
theme_precmd () {
if [[ -z $(git ls-files --other --exclude-standard 2> /dev/null) ]] {
@dennisreimann
dennisreimann / manifesto.md
Created April 23, 2012 18:42 — forked from hmans/whatever-manifesto.md
The Manifesto

THE MANIFESTO

Whatever it is that you choose to do, follow these two simple rules:

  1. Be friendly.
  2. Have fun.