Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dmuhs/little-helpers
:coffee: Some small helper scripts I hacked up in my day to day business
https://github.com/dmuhs/little-helpers
Last synced: 9 days ago
JSON representation
:coffee: Some small helper scripts I hacked up in my day to day business
- Host: GitHub
- URL: https://github.com/dmuhs/little-helpers
- Owner: dmuhs
- License: gpl-3.0
- Created: 2016-01-19T09:52:33.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-01-19T18:52:18.000Z (almost 9 years ago)
- Last Synced: 2024-10-13T18:08:48.539Z (24 days ago)
- Language: Python
- Homepage:
- Size: 19.5 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Little Helpers
Some small helper scripts I hacked up in my day to day business.## Requirements
All Python scripts run on Python 3, because you should let Python 2.x die already and move on with your life. To provide a sweet cli and avoid any pesky argparse code I use [click](http://click.pocoo.org/). Simply install it by running `pip3 install click`.### geoip.py
Looks up the location data (if available) for any valid IPv4 or IPv6 address using the [nekudo geolocation API](http://geoip.nekudo.com/).### docker-clean.sh
Removes all docker containers shown in `docker ps -a` that are **currently not running** and newline-separatedly outputs their IDs. Example:
```bash
$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
ecffc300d8a3 hello-world:latest "/hello" 6 seconds ago Exited (0) 6 seconds ago lonely_stallman
c7ed3897180f hello-world:latest "/hello" 7 seconds ago Exited (0) 6 seconds ago fervent_banach
7f59c19a3e50 hello-world:latest "/hello" 7 seconds ago Exited (0) 6 seconds ago prickly_goldstine
$ ./docker-clean.sh
ecffc300d8a3
c7ed3897180f
7f59c19a3e50
```### url-size.py
Displays the size of a given URL based on its Content-Length in a human-readable format. Especially useful when you're stuck with a bad download rate, need to estimate dependency downloads and the build tool only provides you with resource links.