I hereby claim:
- I am kugland on github.
- I am kugland (https://keybase.io/kugland) on keybase.
- I have a public key whose fingerprint is 6A62 5E60 E3FF FCAE B3AA 50DC 1DA9 3817 80CD D833
To claim this, I am signing this object:
#!/bin/bash | |
# Toggle yakuake's window; if it's not running, start it and then show the window. | |
# (So you don't have to reopen it manually in case you accidentally closed it.) | |
# | |
# To use this script, install it to /usr/local/bin/toggle-yakuake, then disable | |
# yakuake's global shortcut, and create a global shortcut pointing to this script. | |
# | |
# Written by André Kugland |
use std::io::{Read, Write, stdin, stdout}; | |
enum State { | |
Normal, | |
Utf8( | |
/// total number of bytes in the sequence | |
usize, | |
/// number of bytes left to read | |
usize, | |
/// code point (accumulated) |
#!/usr/bin/env python3 | |
import re | |
import sys | |
import argparse | |
import unicodedata | |
if len(sys.argv) == 1: | |
sys.argv.append('-h') |
<?php | |
// | |
// Get all variables from a PHP script. | |
// | |
// Warning: This is probably not a good idea security-wise. | |
// | |
// Usage: | |
// | |
// Let's say you have a script called 'test.php', which contains the following: |
#!/bin/sh | |
SCRIPT_NAME="$(basename "$0")" | |
if [ "$SCRIPT_NAME" != "urlencode" ] && [ "$SCRIPT_NAME" != "urldecode" ]; then | |
echo 'Please run this script as "urlencode" or "urldecode"' | |
exit 1 | |
fi | |
if [ $# -lt 1 ]; then |
#!/bin/sh | |
while getopts "h" option; do | |
case "$option" in | |
h) | |
echo "termbin - Create pastes on termbin.com" | |
echo | |
echo "Usage: termbin [OPTIONS] [FILE] [FILE] ..." | |
echo | |
echo "Options:" |
typeset -A escape_map | |
escape_map[_\\]='\\' | |
for code escape ( | |
0 C@ 1 Ca 2 Cb 3 Cc 4 Cd 5 Ce 6 Cf 7 a | |
8 b 9 t 10 n 11 v 12 f 13 r 14 Cn 15 Co | |
16 Cp 17 Cq 18 Cr 19 Cs 20 Ct 21 Cu 22 Cv 23 Cw | |
24 Cx 25 Cy 26 Cz 27 e 28 'C\\' 29 'C]' 30 'C^' 31 C_ | |
) { |
#!/usr/bin/env -S perl -CSD | |
# Usage: lineinfile <regexp> <new_value> <file1> <file2> <file3> ... | |
use strict; | |
use warnings; | |
use utf8; | |
if (@ARGV < 3) { | |
die "Usage: $0 <regexp> <new_value> <file1> <file2> <file3> ..." |
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/env python3 | |
# Copyright (C) 2023 Andre Kugland | |
# This script is released under the MIT License. | |
""" | |
sort-by-ext: Sort input lines by extension. | |
Usage: sort-by-ext [-0] |