ssh ec2-user@IP
aws configure set region us-west-2
aws s3 ls # listing s3 buckets over VPC endpoint privately
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
| package main | |
| import ( | |
| "bufio" | |
| "fmt" | |
| "io" | |
| "net/http" | |
| "os" | |
| "sync" | |
| ) |
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
| package main | |
| import ( | |
| "bytes" | |
| "fmt" | |
| "io/ioutil" | |
| "log" | |
| "net/http" | |
| "os" | |
| "strconv" |
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/bin/env python | |
| import sys | |
| DELIMITER = '|' | |
| line_number = 0 | |
| with open(sys.argv[1], 'r') as fh: | |
| header = fh.readline() | |
| delim_in_header = header.count(DELIMITER) |
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
| AMI_ID=$1 | |
| REGION=$2 | |
| output=$(aws --region $REGION ec2 describe-images \ | |
| --filter "Name=image-id,Values=$AMI_ID" --output=text | head -1) | |
| ORIGINAL_AMI_NAME=$(echo "$output" | awk -F\t '{print $11}') | |
| ORIGINAL_AMI_OWNER=$(echo "$output" | awk -F\t '{print $12}') | |
| if [[ ! $ORIGINAL_AMI_OWNER =~ ^[0-9]{10,}$ ]]; then |
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/local/bin/bash | |
| RESULTS=`grep ' version ' ./Casks/*.rb` | |
| for RESULT in $RESULTS; do | |
| FILE=$(echo $RESULT | cut -d: -f 1) | |
| VERSION=$(echo $RESULT | cut -d\' -f 2) | |
| OCCURENCE=$(grep -c '$VERSION' $FILE) | |
| if [[ $OCCURENCE -ge 2 ]]; then |
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
| export GOPATH=$HOME/gopath | |
| # Path | |
| export PATH=/opt/local/bin:/usr/local/bin:/opt/local/sbin:/usr/local/sbin:$PATH | |
| export PATH=/usr/local/share/npm/bin:$PATH # NPM | |
| export PATH=/usr/local/mysql/bin:$PATH # MySQL | |
| export PATH=/usr/local/pear/bin:$PATH # Pear | |
| export PATH=/usr/local/opt/gnu-sed/libexec/gnubin:$PATH # sed | |
| export PATH=$GOPATH/bin:$PATH # Go |
I hereby claim:
- I am radeksimko on github.
- I am radeksimko (https://keybase.io/radeksimko) on keybase.
- I have a public key whose fingerprint is A301 4A24 C699 8F16 7D31 FD77 1079 D611 5CFD 80AD
To claim this, I am signing this object:
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
| idsToRemove=( | |
| "com.apple.Notes" | |
| ) | |
| plistBuddy='/usr/libexec/PlistBuddy' | |
| dockPlistPath="$HOME/Library/Preferences/com.apple.dock.plist" | |
| for appIDToRemove in $idsToRemove; do | |
| iconsIndexes=`defaults read com.apple.dock persistent-apps | grep tile-type | awk '/file-tile/ {print NR}'` |
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
| cd ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/ | |
| git clone git://github.com/wbond/sublime_package_control.git Package\ Control | |
| cd Package\ Control | |
| git checkout python3 | |
| # restart Sublime Text 3 and you should have Package Control working |