Skip to content

Instantly share code, notes, and snippets.

View rugk's full-sized avatar
🤔
Thinking…

rugk rugk

🤔
Thinking…
View GitHub Profile
@m-radzikowski
m-radzikowski / script-template.sh
Last active December 18, 2024 13:55
Minimal safe Bash script template - see the article with full description: https://betterdev.blog/minimal-safe-bash-script-template/
#!/usr/bin/env bash
set -Eeuo pipefail
trap cleanup SIGINT SIGTERM ERR EXIT
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)
usage() {
cat <<EOF
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...]
@mermop
mermop / emoji.md
Last active June 22, 2016 02:02
For seeing what a pull request, story, or commit is about at a glance ✨

Emoji-based development classification scheme

For seeing what a pull request, story, or commit is about at a glance ✨

  • 🚩 - feature
  • 🐛 - bug
  • 🔥 - hotfix
  • 🐂 - yak shave
  • 🎨 - visual design change
  • 🛠 - chore
@lelandbatey
lelandbatey / whiteboardCleaner.md
Last active November 28, 2024 10:59
Whiteboard Picture Cleaner - Shell one-liner/script to clean up and beautify photos of whiteboards!

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"

Results

@eighthave
eighthave / find-https-debian-archives.py
Last active May 26, 2024 03:45
Script to find official Debian mirrors that support HTTPS
#!/usr/bin/env python3
import urllib.request
import re
import ssl
import sys
# # find generic mirrors
mirrors = urllib.request.urlopen('http://www.debian.org/mirror/list')
https = []