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
| views/cat/permissions/edit | |
| models/cat/permissins.rb | |
| controller | |
| authorize! :historical_valuations, @company | |
| app/models/ability.rb | |
| menu items | |
| _menu_bar.haml | |
| report_center.haml |
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 | |
| BRANCH_NAME=$(git branch | grep '^*' | sed 's/^* //') | |
| sed -i "" "1s/^/$BRANCH_NAME \\"$'\n'"\\"$'\n'"https:\/\/jira.company.com\/browse\/$BRANCH_NAME/" $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
| #!/bin/sh | |
| # Some things taken from here | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # Set the colours you can use | |
| black='\033[0;30m' | |
| white='\033[0;37m' | |
| red='\033[0;31m' | |
| green='\033[0;32m' |
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
| SELECT aa1.activity, | |
| aa2.activity, | |
| aa1.date, | |
| aa1.account_id | |
| FROM account_activities aa1 | |
| RIGHT JOIN account_activities aa2 ON aa1.account_id = aa2.account_id | |
| AND aa1.date = aa2.date | |
| AND aa1.fund_id = aa2.fund_id | |
| AND aa1.activity <> aa2.activity | |
| JOIN funds f ON aa1.fund_id = f.id |
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
| -- Include the hostname in the prompt, and add a * when in a transaction | |
| -- The default PROMPT2 doesn't make it obvious enough nothing has been sent to the server yet | |
| \set PROMPT1 '%M:%/%R%x%# ' | |
| \set PROMPT2 '> ' | |
| -- Always be in a transaction. It's safer this way | |
| \set AUTOCOMMIT off | |
| -- Turn the pager on always. This is best used with "export PAGER=less -S -F -X" added to your .bashrc | |
| \pset pager always |
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/lib/postgresql/9.2/bin/pg_dump -U sofi -n public -h yyc-sofidb01 sofi_production > /tmp/tavis-full.sql; echo 'grant all on database sofi_dev to sofi;' >> /tmp/tavis-full.sql; | |
| sudo su - postgres; | |
| kill `ps -f -U postgres | grep sofi | grep -v grep | awk '{print $2}'` ; dropdb sofi_dev ; createdb sofi_dev ; psql -d sofi_dev -1 -f /tmp/tavis-full.sql |