env=
token=
repo=
user=
for id in $(curl -u $user:$token https://api.github.com/repos/$user/$repo/deployments\?environment\=$env | jq ".[].id"); do
curl -X POST -u $user:$token -d '{"state":"inactive"}' -H 'accept: application/vnd.github.ant-man-preview+json' https://api.github.com/repos/$user/$repo/deployments/$id/statuses
curl -X DELETE -u $user:$token https://api.github.com/repos/$user/$repo/deployments/$id
done
sudo find / -name ".DS_Store" -exec rm {} \;
git stash save --keep-index --include-untracked && git stash drop
SELECT pg_terminate_backend(pg_stat_activity.pid)
FROM pg_stat_activity
WHERE pg_stat_activity.datname = 'mydb' -- ← change this to your DB
AND pid <> pg_backend_pid();
with pd.option_context('display.max_rows', None, 'display.max_columns', None):
print(df)
openssl aes-128-cbc -d -K babb4a9f774ab853c96c2d653dfe544a -iv 00000000000000000000000000000000 -in "${HOME}/Library/DBeaverData/workspace6/General/.dbeaver/.credentials-config.json.bak" | dd bs=1 skip=16 2>/dev/null
git remote prune origin
git fetch -p && git branch -vv | grep ': gone]' | awk '{print $1}' | xargs git branch -D
Installing pytables Macos github1 --- stackoverflow
export HDF5_DIR=/opt/homebrew/opt/hdf5
kill -9 $(lsof -ti:8000)
sudo apt install libpq-dev
'pyzmq==25.1.0'
with pd.option_context('display.max_rows', None, 'display.max_columns', None, 'display.precision', 3,):
du -h -d 1 | sort -h
SELECT relname, n_live_tup FROM pg_stat_user_tables; -- Table & counts
SELECT
relname as table_name,
pg_size_pretty(pg_total_relation_size(relid)) As "Total Size",
pg_size_pretty(pg_indexes_size(relid)) as "Index Size",
pg_size_pretty(pg_relation_size(relid)) as "Actual Size"
FROM pg_catalog.pg_statio_user_tables
ORDER BY pg_total_relation_size(relid) DESC;
SELECT
attname AS column_name,
avg_width AS average_size_in_bytes
FROM
pg_stats
WHERE
schemaname = 'public'
AND tablename = 'my_table';
select pg_size_pretty(pg_database_size('my_db'));