Skip to content

Instantly share code, notes, and snippets.

View septs's full-sized avatar

septs septs

View GitHub Profile
#!/usr/bin/env python3
import re
import time
import requests
RE_NONCE = re.compile(r"time=(\d+\.\d+)")
RE_INDEX = re.compile(r"\('(\d+)'\)\"\s*>(.+)</a>")
DOWNLOAD_PAGE = "http://www.irouteros.com/download.php"
@septs
septs / gitgraft.sh
Created February 11, 2023 06:11 — forked from Victrid/gitgraft.sh
Find which commit your no-git friend is working on and generate patches for attaching their works onto git tree.
#!/bin/bash
hash git 2>/dev/null || { echo >&2 "Required command 'git' is not installed. ( hmm... why are you using this? ) Aborting."; exit 1; }
hash realpath 2>/dev/null || { echo >&2 "Required command 'realpath' is not installed. Aborting."; exit 1; }
hash pwd 2>/dev/null || { echo >&2 "Required command 'pwd' is not installed. Aborting."; exit 1; }
hash cd 2>/dev/null || { echo >&2 "Required command 'cd' is not installed. Aborting."; exit 1; }
hash echo 2>/dev/null || { echo >&2 "Required command 'echo' is not installed. Aborting."; exit 1; }
hash mv 2>/dev/null || { echo >&2 "Required command 'mv' is not installed. Aborting."; exit 1; }
hash diff 2>/dev/null || { echo >&2 "Required command 'diff' is not installed. Aborting."; exit 1; }
hash diffstat 2>/dev/null || { echo >&2 "Required command 'diffstat' is not installed. Aborting."; exit 1; }