This file contains hidden or 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 | |
# Gets lowest price of an item listen on geizhals.de | |
item="$1" | |
url="https://geizhals.de/${item}.html" | |
price=$(curl -s "$url" | grep lowPrice | sed 's/.*gh_price\">\&euro\;\ \([0-9]\+\),\([0-9]\{2\}\).*/\1.\2€/') | |
echo $price |
This file contains hidden or 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
grn='\e[0;32m' | |
red='\e[0;31m' | |
clr='\e[0m' | |
for i in $1/*; do | |
fn=$(basename $i) | |
# comment keys | |
grep -qc '^# \?key' $i | |
ckeyworks=$? |
This file contains hidden or 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 | |
grn='\e[0;32m' | |
red='\e[0;31m' | |
clr='\e[0m' | |
for f in $1/*; do | |
fn=$(basename $f) | |
# file system time stamp | |
fsts=$(stat -c%y $f | awk '{print $1}') | |
# key file time stamp |
This file contains hidden or 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 | |
for f in $(ls -tr1 "$1"); do | |
d="$(stat -c%y $f | awk '{print $1}')T00:00:00" | |
echo $d $f | |
git add $f | |
GIT_COMMITER_DATE="$d" GIT_AUTHOR_DATE="$d" git commit -m "Add $f" | |
echo | |
done |
This file contains hidden or 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 | |
# Extracts a partition from a full disk image containing a partition table | |
# Colors | |
red='\033[0;31m' | |
green='\033[0;32m' | |
yellow='\033[0;33m' | |
cyan='\033[0;36m' | |
nc='\033[0m' # no color |
This file contains hidden or 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 python3 | |
import socket | |
import sys | |
from PIL import Image | |
host = '192.168.3.36'; | |
port = 2323; | |
w = 48 |
This file contains hidden or 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 | |
# Count users currently logged into a list of Freifunk Kassel nodes | |
url_base=https://graphite.freifunk-kassel.de | |
url_params="rawData=true" | |
time_offset="5min" | |
node_pre="ffks.nodes." | |
node_post=".clients" |
This file contains hidden or 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 | |
# Pings a list of hosts and send a Wake On LAN request on success | |
wake_mac='e8:9a:8f:fd:e6:ce' | |
declare -a ping_hosts=(\ | |
192.168.3.36 \ # flipdot display | |
guest.fd \ | |
drinks-touch.fd \ | |
drinks.fd \ | |
) |
This file contains hidden or 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 | |
# When the power supply is disconnected, shut down machine after a defined time | |
# and warning messages | |
# Time in seconds to shutdown device after disconnected power supply | |
grace_time=500 | |
timeout=0 | |
while :; do | |
state=$(upower -i "$battery" | grep state | awk '{print $2}') |
This file contains hidden or 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
import requests | |
import os | |
import pandas as pd | |
import seaborn as sns | |
import matplotlib.pyplot as plt | |
BASE_URL = 'https://seatfinder.bibliothek.kit.edu/kassel/getdata.php?location%5B0%5D=UBA0EP,UBA1EP,UBA2EP,UBA3EP,UBB0EP,UBB0GP,UBB1EP,UBB1GP,UBB2EP,UBB2GP,LeoEG,LeoOG&values%5B0%5D=manualcount,seatestimate&after%5B0%5D=-1year&before%5B0%5D=now' | |
DELIMITER = ';' | |
FILE_MANUAL_COUNT = 'seatfinder_manual_count.csv' |
OlderNewer