Skip to content

Instantly share code, notes, and snippets.

View boppy's full-sized avatar
🕯️

Henning Bopp boppy

🕯️
View GitHub Profile
@trvswgnr
trvswgnr / compress_video
Last active September 17, 2024 13:38
portable shell script to compress videos with ffmpeg
#!/bin/sh
print_usage() {
echo "usage: compress_video <input_file>"
echo "supported formats: mp4, webm, mkv, mov, avi, flv"
}
get_extension() {
f="${1##*/}"
case "$f" in
@katzefudder
katzefudder / Dockerfile
Last active July 9, 2024 08:19
A simple openresty proxy with metrics endpoint
FROM openresty/openresty:1.21.4.1-1-alpine
ENV PATH=$PATH:/usr/local/openresty/luajit/bin:/usr/local/openresty/nginx/sbin:/usr/local/openresty/bin
RUN apk update \
&& apk add curl perl \
# install nginx-lua-openresty https://opm.openresty.org/package/knyar/nginx-lua-prometheus/
&& opm get knyar/nginx-lua-prometheus \
&& mkdir -p /var/log/nginx \
&& mkdir /var/www \
@lizthegrey
lizthegrey / attributes.rb
Last active August 25, 2024 11:16
Hardening SSH with 2fa
default['sshd']['sshd_config']['AuthenticationMethods'] = 'publickey,keyboard-interactive:pam'
default['sshd']['sshd_config']['ChallengeResponseAuthentication'] = 'yes'
default['sshd']['sshd_config']['PasswordAuthentication'] = 'no'
@fedir
fedir / fosdem_2019.md
Created February 18, 2019 22:23
FOSDEM 2019 > Videos ranking
@fnky
fnky / ANSI.md
Last active September 24, 2024 11:10
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@Rychu-Pawel
Rychu-Pawel / zfs_health_check.sh
Last active March 12, 2023 09:18
ZFS Health Check script for monit. For detailed description and usage go to http://pawelrychlicki.pl/Article/Details/58/zfs-health-check-script-for-monit-09
#! /bin/bash
#
## ZFS health check script for monit.
## v1.0.2
#
## Should be compatible with FreeBSD and Linux. Tested on Ubuntu.
## If you want to use it on FreeBSD then go to Scrub Expired section and Trim Expired section
## and comment two Ubuntu date lines and uncomment two FreeBSD lines in Scrub Expired section.
## In Trim Expired section adjust the date format directly in the for loop's awk parameter.
#
@ammarshah
ammarshah / all_email_provider_domains.txt
Last active September 17, 2024 13:19
A list of all email provider domains (free, paid, blacklist etc). Some of these are probably not around anymore. I've combined a dozen lists from around the web. Current "major providers" should all be in here as of the date this is created.
0-mail.com
007addict.com
020.co.uk
027168.com
0815.ru
0815.su
0clickemail.com
0sg.net
0wnd.net
0wnd.org
@1kastner
1kastner / reflect.py
Last active August 12, 2024 15:24 — forked from huyng/reflect.py
A simple echo server to inspect http web requests
#!/usr/bin/env python
# Reflects the requests from HTTP methods GET, POST, PUT, and DELETE
# Written by Nathan Hamiel (2010)
from http.server import HTTPServer, BaseHTTPRequestHandler
from optparse import OptionParser
class RequestHandler(BaseHTTPRequestHandler):
def do_GET(self):
@fabtho
fabtho / save_screenshot.py
Last active December 12, 2022 08:07
make full screenshot with selenium in python
#!/usr/bin/python
from selenium import webdriver
from PIL import Image
from cStringIO import StringIO
verbose = 1
browser = webdriver.Firefox()
browser.get('http://stackoverflow.com/questions/37906704/taking-a-whole-page-screenshot-with-selenium-marionette-in-python')
@daronco
daronco / letsencrypt-webroot-apache.md
Last active February 15, 2024 11:50
Letsencrypt with webroot on Apache

Config Apache with /etc/apache2/conf-available/le.conf:

Alias /.well-known/acme-challenge/ "/var/www/html/.well-known/acme-challenge/"
<Directory "/var/www/html/">
    AllowOverride None
    Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
    Require method GET POST OPTIONS
</Directory>