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.lbc.co.uk/ | |
| both - beuth | |
| talking - toukin | |
| naughty - nouty | |
| no - neu | |
| so - seu | |
| you - yeu | |
| cant - cânt | |
| daughter - douter |
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
| while read oldrev newrev ref | |
| do | |
| branch=`echo $ref | cut -d/ -f3` | |
| if [ "production" == "$branch" -o "master" == "$branch" ]; then | |
| git --work-tree=/var/www/tracker/production/ checkout -f $branch | |
| cd /var/www/tracker/production/ | |
| # Install any packages, if needed | |
| npm install | |
| # Restart the application. Note: the application uid should be '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
| bundle exec rails g migration AddUserRefToProducts user:references | |
| # Generates | |
| class AddUserRefToProducts < ActiveRecord::Migration | |
| def change | |
| add_reference :products, :user, index: true | |
| end | |
| 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
| sudo tail -f /proc/<pid>/fd/1 | |
| example: sudo tail -f /proc/2394/fd/1 |
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
| describe User do | |
| subject { create(:user, name: 'Wilson Silva', activated: true) } | |
| it { is_expected.to be_activated } | |
| its(:name) { is_expected.to eq('Wilson Silva') } | |
| 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
| #!/bin/sh | |
| export BRANCH=$(git branch | sed -n -e 's/^\* \(.*\)/\1/p') | |
| echo "Deploying $BRANCH to staging" | |
| cap staging deploy |
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/bash | |
| git branch --merged master | grep -v 'master$' | xargs git branch -d |
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
| def self.❨╯°□°❩╯︵┻━┻ | |
| puts 'Calm down, yo.' | |
| 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
| # https://stackoverflow.com/a/44672195/3013522 | |
| git reset --soft HEAD~1 |
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
| describe '#educate' do | |
| it 'increments the education level by 1' do | |
| expect { person.educate }.to change { person.education_level }.from(1).to(2) | |
| end | |
| end |