Skip to content

Instantly share code, notes, and snippets.


Khaled Monsoor kmonsoor

View GitHub Profile
kentcdodds /
Last active Jun 9, 2021


I was poking around trying to figure out all the packages I have access to publish and got curious. So I write this little script to determine the download stats for all the packages I have publish access to.

Feel free to try it yourself. Just change the username passed to getUserDownloadStats.

By default, the stats are sorted by their average daily downloads (descending). That should give you an idea of the most "popular" package of a given user relative to how long that package has been around.

You can use it with npx like so:

larshaendler /
Created Jan 21, 2019
Rename multiple files with prefix or suffix in Linux console

Add a suffix

for file in *; do mv "$file" "$(basename "$file")yourSuffix"; done;

Exmpale to add an underscore "_" at the end each text file:

for file in *.txt; do mv "$file" "$(basename "$file")_"; done;

Add a prefix

nirzaq / option.txt
Created Apr 24, 2018
Available Option
View option.txt
p4kl0nc4t /
Created Mar 10, 2018
RevIP: Simple Reverse IP Lookup Tool
# - RevIP
# | Date: 10/03/2018
# | Author: P4kL0nc4t
# | Description: simple reverse IP lookup tool that combines multiple API to achieve effective result.
import requests
import sys
from socket import gethostbyname
nuhil /
Last active Aug 26, 2019
Javascript Handbook
killall ssh-agent; eval `ssh-agent`
bastman /
Created Mar 31, 2016
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see:

$ docker volume rm $(docker volume ls -qf dangling=true)
$ docker volume ls -qf dangling=true | xargs -r docker volume rm
rvl / git-pushing-multiple.rst
Created Feb 9, 2016
How to push to multiple git remotes at once. Useful if you keep mirrors of your repo.
View git-pushing-multiple.rst

Pushing to Multiple Git Repos

If a project has to have multiple git repos (e.g. Bitbucket and Github) then it's better that they remain in sync.

Usually this would involve pushing each branch to each repo in turn, but actually Git allows pushing to multiple repos in one go.

If in doubt about what git is doing when you run these commands, just

kmonsoor /
Last active Dec 21, 2015
Create a new MarkDown post for Pelican-generated blog
author: Khaled Monsoor <>
modified: 09-Dec-2015
license: The MIT License
import sys
from datetime import datetime