This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ENV["DATABASE_URL"] | |
db = URI.parse(ENV["DATABASE_URL"])¬ | |
db_scheme = db.scheme == 'postgres' ? 'postgresql' : db.scheme¬ | |
options = {¬ | |
:adapter => db_scheme,¬ | |
:host => db.host,¬ | |
:username => db.user,¬ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original | |
------------------------------------------------------------ | |
9 + <% t = first.starts_at %> | |
10 + <% if t.today? %> | |
11 + <%= I18n.t("landing.today") %> | |
12 + <% elsif t.tomorrow? %> | |
13 + <%= I18n.t("landing.tomorrow") %> | |
14 + <% else %> | |
15 + <%= I18n.l t, :format => :short %> | |
16 + <% end %> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'bundler/capistrano' | |
set :application, "net" | |
set :repository, "[email protected]:net.git" | |
set :scm, :git | |
set :default_environment, { | |
'PATH' => "$HOME/.rbenv/shims:$HOME/.rbenv/bin:$PATH" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
sudo apt-get -y update | |
sudo apt-get -y install build-essential zlib1g-dev libssl-dev libreadline6-dev libyaml-dev git | |
cd /tmp | |
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p125.tar.gz | |
tar -xvzf ruby-1.9.3-p125.tar.gz | |
cd ruby-1.9.3-p125/ | |
sudo ./configure --prefix=/usr/local | |
sudo make | |
sudo make install |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
catchup: [ | |
{ | |
video_id: 68523, | |
time_starts_at: null, | |
time_ends_at: null, | |
title_en: "Das unsichtbare Mädchen", | |
title_de: "Das unsichtbare Mädchen", | |
genre_en: null, | |
genre_de: null |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-module(ring). | |
-export([build/1, ring_node/2, loop/1]). | |
build(N) -> | |
Manager = self(), | |
register(ring, Manager), | |
Root = spawn(?MODULE, ring_node, [null, Manager]), | |
Root ! {create, N}, | |
loop(N). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
osascript -e 'say "Dum la dum fa la la dum he dum dum fa dum dum la fa hoo hoo hoo dum dum lah fa he he he dum" using "Cellos"' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class PhonesController < ApplicationController | |
active_scaffold :phone | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class User < ActiveRecord::Base | |
has_many :phones | |
end | |
class Phone < ActiveRecord::Base | |
belongs_to :user | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class UsersController < ApplicationController | |
active_scaffold :user | |
end |