Skip to content

Instantly share code, notes, and snippets.

View croaker's full-sized avatar

Daniel Gruenthal croaker

  • Hamburg, Germany
View GitHub Profile
@croaker
croaker / Classes
Created December 3, 2012 12:57
Reporta Message System
+---------------+
| Conversation |0..* initiator 1+-------+1
|---------------|+---------------------+| User |+----+
|title | +-------+ |
|body | |
|started_at | |
| |0..* project 1+---------+ |
| |+---------------------+| Project | | participant
| | +---------+ |
| | |
@croaker
croaker / chef_solo_bootstrap.sh
Created April 20, 2012 10:43 — forked from ryanb/chef_solo_bootstrap.sh
Bootstrap Chef Solo on Ubuntu or Amazon AMIs
#!/usr/bin/env bash
RUBY_VERSION=1.9.3-p194
if [ -n `which yum` ]
then
# This is necessary for the Amazon Linux AMI
perl -pi -e 's/^(Defaults\s+secure_path.*)$/\1:\/usr\/local\/bin:\/usr\/local\/sbin/g' /etc/sudoers
yum update -y
yum install -y gcc-c++ patch readline readline-devel zlib zlib-devel \
# Transforms the styles to HTML-Tags
styled_span_to_formatting_tags = lambda do |env|
original_node = env[:node]
wrap_with_tags = []
if original_node.name == "span" && original_node.has_attribute?("style")
css_rules = original_node.attribute("style").value.split(";")
wrap_with_tags = css_rules.collect do |css_rule|
case css_rule.strip
when /^text-decoration:\s*underline$/ then "u"
require 'net/dns/resolver'
# Custom Domain
#
# Require net-dns gem
#
# A Rack middleware to to resolve the custom domain to original subdomain
# for your multi telent application.
#
# It's all transperant to your application, it performs cname lookup and