This file contains 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
this.resource("restaurants") | |
this.resource("restaurant", { path: "/restaurants/:restaurant_id" }, function () { | |
this.resource("bookings", function () { | |
this.route("new"); | |
}); | |
this.resource("booking", { path: "/bookings/:booking_id" }); | |
}); |
This file contains 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
<!doctype html> | |
<html> | |
<head> | |
<title>My Little Webapp: Coding Is Magic</title> | |
<meta charset="UTF-8" /> | |
<link rel="stylesheet" href="https://rawgithub.com/krzysztofbialek/Rails-Girls-Warsaw-App/master/style.css" /> | |
</head> | |
<body> | |
</body> | |
</html> |
This file contains 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 'pusher-client' | |
socket = PusherClient::Socket.new('5df8ac576dcccf4fd076') | |
socket.subscribe('common') | |
handler = lambda do |event, data| | |
p [event, data] | |
end | |
events = ['job:created', 'job:started', 'job:finished', 'job:canceled', |
This file contains 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 'yaml' | |
TRANSLATIONS = YAML.load_file('en.yml')['en'] | |
def t(path) | |
current = TRANSLATIONS | |
path.split('.').take_while { |key| current = current[key] } | |
current | |
end |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="description" content="Ember schedule CPU usage" /> | |
<meta charset=utf-8 /> | |
<title>Ember Starting Point</title> | |
<script src="backburner.js"></script> | |
</head> | |
<body> |
This file contains 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
# found in excellent post at: http://reefpoints.dockyard.com/ruby/2013/03/29/running-postgresql-9-2-on-travis-ci.html | |
before_install: | |
- sudo /etc/init.d/postgresql stop | |
- sudo cp /etc/postgresql/9.1/main/pg_hba.conf ./ | |
- sudo apt-get remove postgresql postgresql-9.1 -qq --purge | |
- source /etc/lsb-release | |
- echo "deb http://apt.postgresql.org/pub/repos/apt/ $DISTRIB_CODENAME-pgdg main" > pgdg.list | |
- sudo mv pgdg.list /etc/apt/sources.list.d/ | |
- wget --quiet -O - http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | sudo apt-key add - |
This file contains 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
before_install: | |
- curl -O http://mirrors.kernel.org/ubuntu/pool/main/s/sqlite3/libsqlite3-0_3.7.13-1_amd64.deb | |
- curl -O http://mirrors.kernel.org/ubuntu/pool/main/s/sqlite3/sqlite3_3.7.13-1_amd64.deb | |
- sudo dpkg -i libsqlite3-0_3.7.13-1_amd64.deb sqlite3_3.7.13-1_amd64.deb |
This file contains 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
deploy: | |
- provider: heroku | |
api_key: ... | |
app: staging-app | |
on: | |
branch: master | |
- provider: heroku | |
api_key: ... | |
app: production_app | |
on: |
This file contains 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
install: | |
- "sudo apt-get remove mysql-common mysql-server-5.5 mysql-server-core-5.5 mysql-client-5.5 mysql-client-core-5.5" | |
- "sudo apt-get autoremove" | |
- "sudo apt-get install libaio1" | |
- "wget -O mysql-5.6.14.deb http://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.14-debian6.0-x86_64.deb/from/http://cdn.mysql.com/" | |
- "sudo dpkg -i mysql-5.6.14.deb" | |
- "sudo cp /opt/mysql/server-5.6/support-files/mysql.server /etc/init.d/mysql.server" | |
- "sudo ln -s /opt/mysql/server-5.6/bin/* /usr/bin/" | |
# some config values were changed since 5.5 | |
- "sudo sed -i'' 's/table_cache/table_open_cache/' /etc/mysql/my.cnf" |