Skip to content

Instantly share code, notes, and snippets.

🙌
🙌

Loisaida Sam loisaidasam

🙌
🙌
Block or report user

Report or block loisaidasam

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@loisaidasam
loisaidasam / picblast.sh
Last active Aug 2, 2019 — forked from bwhitman/picblast.sh
Make an audio collage out of your live photos
View picblast.sh
#!/bin/bash
mkdir /tmp/picblast
cd ~/Pictures/Photos\ Library.photoslibrary
for i in $(find . | grep jpegvideocompl)
do
ffmpeg -i $i /tmp/picblast/${i:(-8)}.wav
done
View postgres_queries_and_commands.sql
-- show running queries (9.2+)
SELECT pid, age(clock_timestamp(), query_start), usename, state, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start asc;
-- or if your query is very long/verbose
SELECT pid, age(clock_timestamp(), query_start), usename, state, substring(query, 1, 100)
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
View solution.py
Question: Convert following into the latter data structure in less than 30 lines:
List:
A, B, C
A, C, E
E, F, D
D, A, J
E, D, J
List
You can’t perform that action at this time.