run postgres in docker
docker run -it --rm --name pg -e POSTGRES_PASSWORD=pgp -e POSTGRES_USER=pgu -e POSTGRES_DB=pgdb -p 5432:5432 postgres
connect to postgres from psql:
PGPASSWORD=pgp psql --dbname pgdb --host=localhost --username=pgu
run postgres in docker
docker run -it --rm --name pg -e POSTGRES_PASSWORD=pgp -e POSTGRES_USER=pgu -e POSTGRES_DB=pgdb -p 5432:5432 postgres
connect to postgres from psql:
PGPASSWORD=pgp psql --dbname pgdb --host=localhost --username=pgu
init: | |
pip install --upgrade pip | |
pip install pipenv | |
install: | |
SLUGIFY_USES_TEXT_UNIDECODE=yes pipenv -v install |
ROLE_NAME=arn:aws:iam::123456789123:role/my_role_to_assume | |
AWS=$(aws sts assume-role --role-arn $ROLE_NAME --role-session-name foo --query 'Credentials.[AccessKeyId,SecretAccessKey,SessionToken]' --output text | awk '{print "AWS_ACCESS_KEY_ID=" $1,"AWS_SECRET_ACCESS_KEY=" $2, "AWS_SESSION_TOKEN=" $3}') | |
env -S $AWS aws s3 ls |
package main | |
import ( | |
"fmt" | |
"hash/fnv" | |
"testing" | |
"math/rand" | |
"time" |
func pearson(msg, iv []byte, bytecount int) []byte { | |
var h byte | |
hh := make([]byte, bytecount) | |
for j := 0; j < bytecount; j++ { | |
h = iv[(int(msg[0])+j)%256] | |
for i := 1; i < len(msg); i++ { | |
h = iv[h^msg[i]] | |
} | |
hh[j] = h | |
} |
I hereby claim:
To claim this, I am signing this object:
#!/bin/bash | |
#set -e | |
TERRAFORM_CMD="terraform" | |
TERRAFORM_VERSION="0.6.16" #"0.7.0-rc2" | |
if [ -z ${TERRAFORM_BIN_PATH+x} ]; then | |
TERRAFORM_BIN_PATH="$HOME/.terraform"; | |
fi |
package main | |
import "fmt" | |
import "math/rand" | |
import "time" | |
func init() { | |
rand.Seed(time.Now().Unix()) | |
} |