Skip to content

Instantly share code, notes, and snippets.

@kotnik
kotnik / pastebin.sh
Last active August 26, 2015 10:17 — forked from ralt/pastebin.sh
putfile & pastebin
#!/bin/bash
file=$(mktemp ~/Documents/Pastes/XXXXXX)
mv $file $file.html
file="$file.html"
chmod 644 ${file}
[[ ! -z "$1" ]] && lang="-s $1"
cat - > ${file}.in
location /.well-known/acme-challenge {
default_type text/plain;
alias /srv/<%= @user %>/www/.well-known/acme-challenge;
}
location ~ ^/(?!\.well-known)\..*$ { return 403; }
#!/usr/bin/env python3
import sys
import datetime
import subprocess
from collections import Counter
if __name__ == '__main__':
hours = {}
-- Logs begin at Thu 2015-12-10 11:32:31 CET, end at Tue 2016-05-10 22:58:29 CEST. --
May 10 21:29:17 carpo systemd-journald[284]: Runtime journal (/run/log/journal/) is 8.0M, max 787.6M, 779.6M free.
May 10 21:29:17 carpo systemd-journald[284]: System journal (/var/log/journal/) is 1.9G, max 4.0G, 2.0G free.
May 10 21:29:17 carpo systemd-journald[284]: Time spent on flushing to /var is 96.647ms for 2 entries.
May 10 21:29:17 carpo kernel: Linux version 4.5.3-1-ARCH (builduser@tobias) (gcc version 6.1.1 20160501 (GCC) ) #1 SMP PREEMPT Sat May 7 20:43:57 CEST 2016
May 10 21:29:17 carpo kernel: Command line: BOOT_IMAGE=/vmlinuz-linux root=UUID=92fdeb9f-682d-475b-b60c-40d7a224d7de rw cryptdevice=/dev/sda2:cryptroot quiet
May 10 21:29:17 carpo kernel: x86/fpu: xstate_offset[2]: 576, xstate_sizes[2]: 256
May 10 21:29:17 carpo kernel: x86/fpu: Supporting XSAVE feature 0x01: 'x87 floating point registers'
May 10 21:29:17 carpo kernel: x86/fpu: Supporting XSAVE feature 0x02: 'SSE registers'
May 10 21:29:17 carpo ke
@kotnik
kotnik / hook.sh
Created August 1, 2016 08:41
Git update hook to allow only signed commits
#!/usr/bin/env bash
##############################################################################
#
# check-commit-signature
# ----------------------
# A server-side update git hook for checking the GPG signature of a pushed
# commit.
#
# To enable this hook, rename this file to "update".
#