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 | |
set -o errexit | |
# A native bash function to mimic the behaviour of shuf(1). | |
# | |
# - From the failed experiments department. | |
# - Unusably slow on long files with thousands of lines. | |
# | |
# "Arrays are sparse doubly-linked lists." | |
# https://git.savannah.gnu.org/cgit/bash.git/tree/array.c |
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
# /lib/systemd/system/eea.service.d/stfd.conf | |
[Service] | |
TimeoutStopSec=5 | |
TimeoutStopFailureMode=kill |
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 ansible-playbook | |
--- | |
- hosts: localhost | |
become: false | |
gather_facts: false | |
connection: local | |
tasks: | |
- name: Systemd user config location | |
file: | |
path: ~/.config/systemd/user/ |
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
#include "HID-Project.h" | |
#define WAIT_SECS 900 | |
void setup() { | |
BootKeyboard.begin(); | |
delay(10 * 1000); | |
} | |
void loop() { |
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
# Run every minute and do things IF NOT night. | |
* * * * * (is_night || do_things) >/dev/null 2>&1 | |
# Run every hour and do things IF night. | |
0 * * * * (is_night && do_things) >/dev/null 2>&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
#!/usr/bin/env bash | |
# dashcat can be used to concatenate dashcam videos | |
overlap=1 | |
function cleanup(){ | |
trap - INT QUIT TERM EXIT | |
rm -v -f "${playlist_temp}" | |
for t in "${video_temp[@]}" |
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 | |
# Process only the get requests to this credential helper. | |
# https://git-scm.com/book/en/v2/Git-Tools-Credential-Storage | |
# git config credential.helper 'azdo-token' | |
[[ "${1}" == "store" ]] && exit 0 | |
[[ "${1}" == "erase" ]] && exit 0 | |
want_username="${SUDO_USER}" | |
printf -v want_aes_file "%s/.azdo-token-for-%s.aes" "${HOME}" "${want_username}" |
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
Neuer Link: https://github.com/mschmitt/go-e-widget | |
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 | |
url="http://go-echarger/status" | |
#url="https://api.go-e.co/api_status?token=abcdef0123" | |
if [[ "${url}" =~ api.go-e.co ]] | |
then | |
dataobject='.data' | |
else | |
dataobject='.' |