Skip to content

Instantly share code, notes, and snippets.

Daniel Datsev orangeblock

Block or report user

Report or block orangeblock

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@orangeblock
orangeblock / dler.py
Last active Dec 23, 2018
Customizable concurrent URL downloader. Works with Python 2.7x and 3.x, only using core libraries. Can be ran as a command line script or used as a library. Simply pass a list of URLs to download_files. For the rest simply read the docstring or --help from the CL.
View dler.py
#!/usr/bin/python
import os
import sys
import csv
import time
import shutil
from multiprocessing.dummy import Pool as ThreadPool
from collections import Iterable
try:
@orangeblock
orangeblock / handler.sh
Last active Mar 22, 2020
GitHub webhook listener, using netcat and bash. `listen.sh` and `handler.sh` must be in the same directory. Start with `./listen.sh <port> <path-to-script> [<endpoint>]`. All files (including scripts) must be executable.
View handler.sh
#!/bin/bash
# parse endpoint (only works for POST)
read request
url="${request#POST }"
url="${url% HTTP/*}"
# change this!!!
secret="top-secret"
You can’t perform that action at this time.