I hereby claim:
- I am duthied on github.
- I am devlonduthie (https://keybase.io/devlonduthie) on keybase.
- I have a public key ASBMGgMJTpqNf4QyCSQMZEKOhK4GJ6xPsB6SZFFDArZ-Wwo
To claim this, I am signing this object:
#!/bin/bash | |
# from https://coderwall.com/p/gog45a | |
function lastworkingday() | |
{ | |
if [[ "1" == "$(date +%u)" ]] | |
then | |
echo "last friday" | |
else | |
echo "yesterday" |
if ($request_method = 'GET') { | |
add_header 'Access-Control-Allow-Origin' "$http_origin"; | |
} | |
if ($request_method = 'POST') { | |
add_header 'Access-Control-Allow-Origin' "$http_origin"; | |
} | |
if ($request_method = 'OPTIONS') { | |
add_header 'Access-Control-Allow-Origin' "$http_origin"; |
#!/bin/bash | |
read -r url<./url.txt | |
# stop chromium | |
sudo killall chromium-browser | |
# manually set the display to one that is currently being used | |
# start chromium in kiosk mode with the URL we want to load | |
# use nohup so it stays up after we disconnect |
I hereby claim:
To claim this, I am signing this object:
#!/bin/bash | |
exec 3>&1 4>&2 | |
trap 'exec 2>&4 1>&3' 0 1 2 3 | |
exec 1>readiness-log.out 2>&1 | |
echo "--START READINESS--" | |
while :; do | |
echo "`date`" |
#!/bin/bash | |
exec 3>&1 4>&2 | |
trap 'exec 2>&4 1>&3' 0 1 2 3 | |
exec 1>liveness-log.out 2>&1 | |
echo "--START LIVENESS--" | |
while :; do | |
echo "`date`" |
func ExampleTx_Rollback() { | |
tx, err := db.BeginTx(ctx, &sql.TxOptions{Isolation: sql.LevelSerializable}) | |
if err != nil { | |
log.Fatal(err) | |
} | |
id := 53 | |
_, err = tx.ExecContext(ctx, "UPDATE drivers SET status = ? WHERE id = ?;", "assigned", id) | |
if err != nil { | |
if rollbackErr := tx.Rollback(); rollbackErr != nil { | |
log.Fatalf("update drivers: unable to rollback: %v", rollbackErr) |