Skip to content

Instantly share code, notes, and snippets.

View 2-elements-per-iteration.hbs
<table>
{{#for post in posts}}
<tr><td>First row</td></tr>
<tr><td>Second row</td></tr>
{{/for}}
</table>
View 01_sketelon.html
<!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>
View pusher-travis-client.rb
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',
View translations_replacer.rb
require 'yaml'
TRANSLATIONS = YAML.load_file('en.yml')['en']
def t(path)
current = TRANSLATIONS
path.split('.').take_while { |key| current = current[key] }
current
end
@drogus
drogus / test.html
Created Nov 11, 2013
backburner memory bug test
View test.html
<!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>
View travis.yml
# 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 -
@drogus
drogus / travis.yml
Created Nov 4, 2013
install sqlite3 3.7.13 on travis
View travis.yml
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
View deploy.example.yml
deploy:
- provider: heroku
api_key: ...
app: staging-app
on:
branch: master
- provider: heroku
api_key: ...
app: production_app
on:
View install-mysql-5.6-on-travis.yml
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"
View gist:6184061
{
"payload": {
"id": 1,
"number": 1,
"status": null,
"started_at": null,
"finished_at": null,
"status_message": "Passed",
"commit": "62aae5f70ceee39123ef",
"branch": "master",