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
| require 'active_record' | |
| require 'arel' | |
| # Ruby-like syntax in AR conditions using the underlying Arel layer (Rails >= 3.0). | |
| # | |
| # What you would usually write like this: | |
| # | |
| # User.where(["users.created_at > ? AND users.name LIKE ?", Date.yesterday, "Mary"]) | |
| # | |
| # can now be written like this (note those parentheses required by the operators precedences): |
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
| .env | |
| .npmrc | |
| .ssh/ | |
| *.sqlite | |
| *.log | |
| node_modules/ |
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
| [push] | |
| default = tracking | |
| [branch] | |
| autosetuprebase = always | |
| [alias] | |
| c = commit | |
| u = pull --rebase | |
| p = push | |
| dev = checkout development | |
| new = checkout -b |
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
| function grmaster() { | |
| b=$(git branch | sed -n '/\* /s///p') | |
| git checkout master | |
| git pull --rebase | |
| git checkout $b | |
| git rebase master | |
| } |
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
| function genpasswd() { | |
| local l=$1 | |
| [ "$l" == "" ] && l=32 | |
| tr -dc "!$#;,.%()A-Za-z0-9_" < /dev/urandom | head -c ${l} | xargs | |
| } |
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
| function update-go() { | |
| release=$(curl --silent https://golang.org/doc/devel/release.html | grep -Eo 'go[0-9]+(\.[0-9]+)+' | sort -V | uniq | tail -1) | |
| os=$(uname -s | tr '[:upper:]' '[:lower:]') | |
| arch=$(case "$(uname -m)" in i*) echo '386' ;; x*) echo 'amd64' ;; *) echo 'armv61'; esac) | |
| curl --silent https://storage.googleapis.com/golang/$release.$os-$arch.tar.gz \ | |
| | sudo tar -vxz --strip-components 1 -C $(dirname $(dirname $(which go))) | |
| } |
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
| function aws-login() { | |
| eval $(aws-mfa ecr get-login --no-include-email) | |
| } | |
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 disableAnimationStyles = '-webkit-transition: none !important;' + | |
| '-moz-transition: none !important;' + | |
| '-ms-transition: none !important;' + | |
| '-o-transition: none !important;' + | |
| 'transition: none !important;' + | |
| 'transition-property: none !important;' + | |
| '-o-transition-property: none !important;' + | |
| '-moz-transition-property: none !important;' + | |
| '-ms-transition-property: none !important;' + | |
| '-webkit-transition-property: none !important;' + |