Skip to content

Instantly share code, notes, and snippets.

View normoes's full-sized avatar
💭
working

Norman Schenck normoes

💭
working
View GitHub Profile
@normoes
normoes / get_ashandle_of_domain.md
Last active March 10, 2022 21:28
Get ASHandle of a domain

Get ASHandle of a domain

I wanted to get all IPs that belong to facebook.com.

The command I found is the following

whois -h whois.radb.net -- '-i origin AS32934'

whois -h whois.radb.net -- '-i origin AS32934' | grep ^route
@normoes
normoes / python_privy.md
Created June 13, 2020 14:49
Python and privy - password-protect data

Python and privy

python -c "import privy; hidden=privy.hide(secret=b'test', password='passwd', security=2); print(hidden); plain=privy.peek(hidden=hidden, password='passwd'); print(plain.decode())"

Output:

1$2$7nzvIxU2Xkt8DE4DgxwIgRt_HE6acDcPx10mCCQXbDM=$Z0FBQUFBQmU1T1pKQ0hfSVJ6bmZxZVpVckpTTzd4NElYNnVfNGdweFZiLUQtdDVCREQ2djJPLWxFVG81bXNHaUtmbnJ4NTVYZXpLbm1CdWl4aEF0cFd3ZTJES19HR1ViNXc9PQ==
test
@normoes
normoes / aws_rds_postgres shared_buffers.md
Last active December 11, 2024 19:57
AWS RDS PostgreSQL shared_buffers
@normoes
normoes / remove_docker_volumes.md
Last active November 23, 2020 08:10
Remove docker volumes

This is more or less a sequence of manual steps, because I don't want to remove volumes I might still need, especially if no containers are using those volumes at the moment.

This is also why I, sometimes, prefer the following over: docker volume prune.


In situations where I have literally thousands of docker volumes, basically after a long time of not removing any docker volumes, the following comes in handy.

At first I get the 200 (just some number) biggest docker volumes (as root). I exclude containers, that contain postgres or redis in their names, essentially allowing the removal of all other volatile containers, named and unnamed.