Skip to content

Instantly share code, notes, and snippets.

View so-jelly's full-sized avatar
🍑
Peachy

Shawn O'Dell so-jelly

🍑
Peachy
  • @Wärtsilä
  • Milwaukee, WI
View GitHub Profile
@so-jelly
so-jelly / gitlog.sh
Last active May 30, 2019 15:23
get commits from tags to clipboard
git fetch upstream --tags
git log '1.0.0.1'..'01.00.01.01' --oneline --no-merges --relative-date | pbcopy
#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;
@so-jelly
so-jelly / asdf.jql
Created May 3, 2019 22:16
JIRA - JQL
# 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()
@so-jelly
so-jelly / lifecycle.json
Created April 22, 2019 20:32
GCS bucket version and lifecycle
{
"lifecycle": {
"rule": [{
"action": {
"type": "Delete"
},
"condition": {
"numNewerVersions": 14
}
}]
kubectl patch deployment web -p "{\"spec\":{\"template\":{\"metadata\":{\"labels\":{\"date\":\"`date +'%s'`\"}}}}}"
# 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