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
#!/usr/bin/env bash | |
# Abort sign off on any error | |
set -e | |
# Start the benchmark timer | |
SECONDS=0 | |
# Repository introspection | |
OWNER=$(gh repo view --json owner --jq .owner.login) |
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
## quickly run test 10 times and show only failing lines | |
for i in {1..10} | |
do | |
mix test aweb/controllers/account_controller_test.exs | egrep "_test.exs:\d+$" | |
done |
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
find . -iname '*.ex' -type f -exec sed -i '' 's/[[:space:]]\{1,\}$//' {} \+ |
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
set nocompatible | |
call pathogen#infect() | |
call pathogen#helptags() | |
let mapleader = "," | |
syntax enable | |
" Mappings {{{ | |
" Insert mode mappings {{{ |
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
# set prefix to control-f | |
set -g prefix C-f | |
#unbind system defined prefix | |
unbind C-b | |
# helps in faster key repetition | |
set -sg escape-time 0 | |
# start session number from 1 rather than 0 |
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
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "AddPerm", | |
"Effect": "Allow", | |
"Principal": "*", | |
"Action": "s3:GetObject", | |
"Resource": "arn:aws:s3:::bucket/subbucket/*" | |
} |
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
#push a subdirectory called backend to heroku | |
# the branch is develop | |
git push heroku `git subtree split --prefix backend develop`:master -f |
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
#Comment | Uncomment ''RewriteEngine on'' below if it is not in your public_html .htaccess file | |
#You only need to have this once in the public_html .htaccess as it covers all other Rewrites | |
RewriteEngine on | |
#Comment | Force all URLs to https WITHOUT www | |
RewriteCond %{SERVER_PORT} 80 | |
RewriteRule ^(.*)$ https://example.com/$1 [R,L] | |
#Comment | Force all URLs to https WITH www | |
RewriteCond %{SERVER_PORT} 80 |
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
#make sure rvm is installed then | |
rvm pkg install openssl | |
CC=gcc-6 RUBY_EXTRA_CONFIGURE_OPTIONS="--with-openssl-dir=$HOME/.rvm/usr" asdf install ruby 2.3.1 |