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
# need a backup? | |
## mysql -u$MYSQL_USER -p$MYSQL_PASSWORD -h$MYSQL_HOST $MYSQL_DATABASE | gzip > $(date +%s).sql.tgz | |
echo 'SET FOREIGN_KEY_CHECKS = 0;' > drop_all_tables.sql | |
mysqldump --add-drop-table --no-data -u$MYSQL_USER -p$MYSQL_PASSWORD -h$MYSQL_HOST $MYSQL_DATABASE \ | |
| grep 'DROP TABLE' >> drop_all_tables.sql | |
echo 'SET FOREIGN_KEY_CHECKS = 1;' >> drop_all_tables.sql | |
mysql -u$MYSQL_USER -p$MYSQL_PASSWORD -h$MYSQL_HOST $MYSQL_DATABASE < drop_all_tables.sql |
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
kubectl patch deployment web -p "{\"spec\":{\"template\":{\"metadata\":{\"labels\":{\"date\":\"`date +'%s'`\"}}}}}" |
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
{ | |
"lifecycle": { | |
"rule": [{ | |
"action": { | |
"type": "Delete" | |
}, | |
"condition": { | |
"numNewerVersions": 14 | |
} | |
}] |
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
# wtf am i doing here? | |
assignee = currentUser() AND status not in ("Ready for QA - UAT",Done,"In QA") AND resolution = Unresolved AND Sprint in openSprints() order by priority DESC | |
# new phone, who dis? | |
(summary ~ currentUser() OR description ~ currentUser() OR comment ~ currentUser()) and updatedDate >= -7d | |
# what's up with my project(s) | |
project in ( BOA, UXHWB, B0GCS ) AND Sprint in openSprints() |
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
#can't mix wildcard with allow-credentials | |
add_header 'Access-Control-Allow-Origin' * always; | |
add_header 'Access-Control-Allow-Credentials' 'true' always; | |
add_header 'Access-Control-Allow-Methods' 'GET, POST' always; | |
add_header 'Access-Control-Allow-Headers' 'Accept,Authorization,Cache-Control,Content-Type,DNT,If-Modified-Since,Keep-Alive,Origin,User-Agent,X-Requested-With' always; |
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
git fetch upstream --tags | |
git log '1.0.0.1'..'01.00.01.01' --oneline --no-merges --relative-date | pbcopy |
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
alias apt-get='apt-get \ | |
-o Acquire::BrokenProxy="true" \ | |
-o Acquire::http::No-Cache="true" \ | |
-o Acquire::http::Pipeline-Depth="0" \ | |
-o Acquire::CompressionTypes::Order::="gz"' |
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
resource.type="k8s_cluster" | |
protoPayload.methodName="io.k8s.core.v1.pods.exec.create" |
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
func advanceLetter(s string, n int) string { | |
var x []rune | |
// add a known rune to the slice in case we need to advance it | |
x = append(x, rune(1337)) | |
// Create a slice of runes | |
for _, r := range s { | |
x = append(x, r) | |
} | |
// Need to reverse index |
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
branchclean () { | |
for branch in $(git branch | grep -v master) | |
do | |
git branch -d $branch | |
done | |
} |
OlderNewer