Skip to content

Instantly share code, notes, and snippets.

View kmonsoor's full-sized avatar
:octocat:

Khaled Monsoor kmonsoor

:octocat:
View GitHub Profile
@kentcdodds
kentcdodds / README.md
Last active March 30, 2024 11:39
user-package-stats

user-package-stats

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:

@nirzaq
nirzaq / option.txt
Created April 24, 2018 10:07
Available Option
'abandoned',
'beach',
'bike',
'birthday',
'broken',
'breakfast',
'business',
'cake',
'car',
'cat',
@lc-at
lc-at / revip.py
Created March 10, 2018 07:38
RevIP: Simple Reverse IP Lookup Tool
#!/usr/bin/python
# - 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
requests.packages.urllib3.disable_warnings()
from socket import gethostbyname
@nuhil
nuhil / js.md
Last active July 1, 2024 20:45
Javascript Handbook
@JoaquimLey
JoaquimLey / restart-ssh-gist.sh
Created August 10, 2016 23:02
Restart ssh-agent
killall ssh-agent; eval `ssh-agent`
@bastman
bastman / docker-cleanup-resources.md
Created March 31, 2016 05:55
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: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@rvl
rvl / git-pushing-multiple.rst
Created February 9, 2016 11:41
How to push to multiple git remotes at once. Useful if you keep mirrors of your repo.

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
kmonsoor / pelican_new_MD_post_template.py
Last active December 21, 2015 00:40
Create a new MarkDown post for Pelican-generated blog
"""
author: Khaled Monsoor <[email protected]>
modified: 09-Dec-2015
license: The MIT License
"""
import sys
from datetime import datetime
from sre_parse import Pattern, SubPattern, parse as sre_parse
from sre_compile import compile as sre_compile
from sre_constants import BRANCH, SUBPATTERN
class Scanner(object):
def __init__(self, tokens, flags=0):
subpatterns = []
pat = Pattern()