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
Set up secret_key_base for current environment in config/secrets.yml |
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
Ember.Test.registerHelper('selectFrom', | |
function(app, selector, value, description) { | |
// choose an option | |
find(selector).val(value); | |
// trigger the change | |
find(selector).change(); | |
// assert the selected option | |
equal(find(selector+" option:selected").val(), value, description||"makes the selection"); | |
// promise | |
return wait(); |
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
bin/rake db:{drop,create,migrate} |
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
# http://www.seanbehan.com/how-to-create-blurry-background-images-programmatically-from-the-command-line-or-with-ruby | |
convert path/to/original-image.jpg -channel RGBA -blur 0x5 path/to/blurry-image.jpg |
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
# http://www.thegeekstuff.com/2009/01/how-to-backup-and-restore-postgres-database-using-pg_dump-and-psql/ | |
# Backup: | |
$ pg_dump -U {user-name} {source_db} -f {dumpfilename.sql} -W | |
# requires to configure md5 auth: | |
sudo vim /etc/postgresql/9.4/main/pg_hba.conf | |
# add: | |
# local all apps md5 |
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
var path = require('path'), | |
appConfig = require(path.join(__dirname, '/../config/app')); |
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
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |
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
apt-get -y update | |
apt-get install -y git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties vim mc | |
# Check locale | |
locale | |
# Edit locale file if some ENV variables are missing | |
vim /etc/default/locale | |
LANG=en_US.UTF-8 | |
LANGUAGE=en_US.UTF-8 | |
LC_ALL=en_US.UTF-8 |
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.exports = { | |
"env": { | |
"browser": true, | |
"es6": true | |
}, | |
"extends": [ | |
"eslint:recommended", | |
], | |
"parserOptions": { | |
"ecmaFeatures": { |