What is my shell?
echo "$SHELL"
```
**If your shell is ZSH**
````shell
brew install go --cross-compile-common| export MYSQL_USER="" | |
| export MYSQL_PASSWORD="" | |
| export DATABASE="" | |
| CREATE USER '$MYSQL_USER'@'%' IDENTIFIED BY '$MYSQL_PASSWORD'; | |
| GRANT ALL PRIVILEGES ON $DATABASE . * TO '$MYSQL_USER'@'%'; | |
| FLUSH PRIVILEGES; |
| openssl req -x509 -out localhost.crt -keyout localhost.key \ | |
| -newkey rsa:2048 -nodes -sha256 \ | |
| -subj '/CN=localhost' -extensions EXT -config <( \ | |
| printf "[dn]\nCN=localhost\n[req]\ndistinguished_name = dn\n[EXT]\nsubjectAltName=DNS:localhost\nkeyUsage=digitalSignature\nextendedKeyUsage=serverAuth") |
| # get mx records for a domain | |
| iMac ➜ ~ host -t MX elasticbyte.net | |
| elasticbyte.net mail is handled by 1 aspmx.l.google.com. | |
| elasticbyte.net mail is handled by 10 aspmx2.googlemail.com. | |
| elasticbyte.net mail is handled by 10 aspmx3.googlemail.com. | |
| elasticbyte.net mail is handled by 5 alt1.aspmx.l.google.com. | |
| elasticbyte.net mail is handled by 5 alt2.aspmx.l.google.com. | |
| # lookup ip of the first mx record | |
| iMac ➜ ~ dig +short aspmx.l.google.com |
| provider "aws" { | |
| region = "us-east-1" | |
| } | |
| variable "cidr" { | |
| # default = "0.0.0.0/0" | |
| default = "" | |
| } | |
| resource "aws_security_group" "dummy" { |
| wget https://git.io/vpnsetup -O vpnsetup.sh && sudo \ | |
| VPN_IPSEC_PSK='your_ipsec_pre_shared_key' \ | |
| VPN_USER='your_vpn_username' \ | |
| VPN_PASSWORD='your_vpn_password' sh vpnsetup.sh |
| /*! | |
| * jQuery JavaScript Library v1.12.3 -css,-css/addGetHookIf,-css/adjustCSS,-css/curCSS,-css/defaultDisplay,-css/hiddenVisibleSelectors,-css/showHide,-css/support,-css/var/cssExpand,-css/var/isHidden,-css/var/rmargin,-css/var/rnumnonpx,-css/var/swap,-effects,-effects/Tween,-effects/animatedSelector,-effects/support,-dimensions,-offset,-deprecated,-event,-event/ajax,-event/alias,-event/support,-event/focusin,-event/trigger,-wrap,-core/ready,-exports/amd | |
| * http://jquery.com/ | |
| * | |
| * Includes Sizzle.js | |
| * http://sizzlejs.com/ | |
| * | |
| * Copyright jQuery Foundation and other contributors | |
| * Released under the MIT license | |
| * http://jquery.org/license |
What is my shell?
echo "$SHELL"
```
**If your shell is ZSH**
````shell
brew install go --cross-compile-common| OPBEAT_APP_IDS=('e56ec269d6' '29bb1bb075' '5e6e36c7ef' '374e78ad7a') | |
| for i in "${OPBEAT_APP_IDS[@]}" | |
| do | |
| curl https://opbeat.com/api/v1/organizations/OUR-ORG-ID-HERE/apps/"$i"/releases/ \ | |
| -H "Authorization: Bearer OUR-SECRET-TOKEN-HERE" \ | |
| -d rev=`git log -n 1 --pretty=format:%H` \ | |
| -d branch=`git rev-parse --abbrev-ref HEAD` \ | |
| -d machine=`hostname` | |
| -d status=machine-completed |
| cd ~ | |
| curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.25.4/install.sh | bash | |
| nvm install iojs | |
| nvm use iojs | |
| n=$(which node);n=${n%/bin/node}; chmod -R 755 $n/bin/*; sudo cp -r $n/{bin,lib,share} /usr/local |
| BASE_PATH="/srv/www" | |
| REPO_PATH="/srv/www/repo" | |
| GIT_URL="https://github.com/username/repo.git" | |
| if [ -d "$REPO_PATH" ]; then | |
| cd $REPO_PATH || exit 3 | |
| git pull --quiet | |
| echo "git pull successfully ran ($(git rev-parse --short HEAD))"; | |
| else | |
| cd $BASE_PATH || exit 3 |