When you can't use docker -q because you need to filter first. . .
docker images |grep -e 9.5 -e latest |awk '{print $3}'
Remove all incomplete docker images (temporary from failed builds):
docker images -f "dangling=true" -q |xargs docker rmi
jq -r '.Credentials | ["export", "AWS_ACCESS_KEY_ID="+.AccessKeyId, "AWS_SECRET_ACCESS_KEY="+.SecretAccessKey, "AWS_SESSION_TOKEN="+.SessionToken] | join(" ")' |
SET some.new_setting = '' | |
; | |
ALTER SYSTEM SET some.new_setting = '◕‿◕' | |
; | |
SELECT pg_reload_conf() | |
; | |
## validate the new setting | |
SET some.new_setting = DEFAULT | |
; |
>>> import psycopg2 | |
>>> conn = pyscopg2.connect("dbname=phil user=phil") | |
>>> cur = conn.cursor() | |
>>> cur.execute("CREATE TABLE some_table(id serial PRIMARY KEY, some_val text);") | |
>>> cur.execute("CREATE FUNCTION some_func(val text) RETURNS int AS $$ INSERT INTO some_table(some_val) SELECT $1 RETURNING id; $$LANGUAGE SQL;") | |
>>> cur.callproc("some_func", {"val": "fun times"}) | |
>>> cur.fetchone() | |
(1,) | |
>>> cur.execute("CREATE FUNCTION some_other_func(text) RETURNS int AS $$ INSERT INTO some_table(some_val) SELECT $1 RETURNING id; $$LANGUAGE SQL;") | |
>>> cur.callproc("some_other_func", {"val": "fun times"}) |
fizz_range = 100 | |
the_map = {3:'fizz',5:'buzz',9:'shazam'} | |
fiz = lambda i: ( | |
''.join([ | |
the_map[z] for z in filter( | |
lambda x: i % x == 0, | |
sorted(the_map.keys())) | |
]) | |
or |
## powershell.exe -NoProfile -NoLogo -File .\ping-target.ps1 | |
$log = "c:\dev\mount\logs\the_ping.log" | |
$target = "chickenofthesea.com" | |
$repeats = 60 | |
$sleep_ms = 650 | |
$date_format = "yyyyMMdd HH:mm:ss" | |
for ($i=0; $i -lt $repeats; $i++) { | |
"$(Get-Date -Format $date_format) $(ping -n 1 $target | Select-String 'Reply|Request')" >> $log |
When you can't use docker -q because you need to filter first. . .
docker images |grep -e 9.5 -e latest |awk '{print $3}'
Remove all incomplete docker images (temporary from failed builds):
docker images -f "dangling=true" -q |xargs docker rmi
alias sdc-ls='sdc-listmachines |json -a name state ips[0] ips[1] id' |
I hereby claim: