This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
tmpfile=$(mktemp) | |
clean_up() { | |
rm -f "$tmpfile" | |
} | |
trap "clean_up" EXIT | |
trap "clean_up; exit 1" INT TERM |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Check if all fields are the same. | |
NF > 1 { | |
i=2 # nth field to starts with | |
for (i; i<=NF; i++) { | |
for (j=i+1; j<=NF; j++) { | |
if ($i != $j) { | |
print $0 | |
break |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
from __future__ import print_function | |
import sys | |
if sys.version_info[0] == 3: | |
import urllib.request as urllib | |
else: | |
import urllib2 as urllib | |
import json | |
def usage(): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Copyright 2018, 2019, 2020 Azure Zanculmarktum | |
# All rights reserved. | |
# | |
# Redistribution and use of this script, with or without modification, is | |
# permitted provided that the following conditions are met: | |
# | |
# 1. Redistributions of this script must retain the above copyright | |
# notice, this list of conditions and the following disclaimer. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
urlencode() { | |
c="${1%${1#?}}" | |
if [ -n "$c" ]; then | |
case "$c" in | |
[a-zA-Z0-9.~_-]) printf "$c" ;; | |
*) printf '%%%.2X' "'$c" ;; | |
esac | |
urlencode "${1#?}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Adds a telkampret connection to NetworkManager. | |
if [ "$(id -u)" != "0" ]; then | |
echo "${0##*/}: super user access required" >&2 | |
exit 1 | |
fi | |
if ! which nmcli >/dev/null 2>&1; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Copyright 2018 Azure Zanculmarktum | |
# All rights reserved. | |
# | |
# Redistribution and use of this script, with or without modification, is | |
# permitted provided that the following conditions are met: | |
# | |
# 1. Redistributions of this script must retain the above copyright | |
# notice, this list of conditions and the following disclaimer. |