See also:
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
// ==UserScript== | |
// @name htw autologin | |
// @namespace lsf-htw-berlin | |
// @include https://lsf.htw-berlin.de/* | |
// @version 1 | |
// @grant none | |
// ==/UserScript== | |
x=document.getElementsByName("submit").item(0); |
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
function waitForSelector(s:string) { | |
const d = Date.now(); | |
return new Promise((resolve, reject) => { | |
const timeout = setTimeout(() => { | |
clearInterval(interval); | |
reject(new Error(`never found {s}`)); | |
}, 2000); | |
const interval = setInterval(() => { | |
const el = document.querySelector(s); | |
if (el) { |
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
local wezterm = require("wezterm") | |
local act = wezterm.action | |
local module = {} | |
local function write_layout(name, window_config) | |
local file = io.open(wezterm.config_dir .. "/layouts/" .. name .. ".json", "w") | |
if file then | |
file:write(wezterm.json_encode(window_config)) | |
file:close() | |
end |
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 bash | |
pdf_dir="lec" | |
mkdir -p lec_out/lec | |
for file in "$pdf_dir"/*.pdf; do | |
filename=$(basename -- "$file") | |
filename_no_ext="${filename#lec_}" | |
filename_no_ext="${filename%.*}" | |
echo "$filename_no_ext" > filename.txt |
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
[positional-arguments] | |
parallog +args: | |
#!/usr/bin/env bash | |
trap "kill 0" EXIT SIGINT SIGTERM | |
align=$((1 + `printf "%s\n" "$@" | wc -L`)) | |
while (("$#")); do | |
color=$((31 + ("$#" % 6))) | |
prefix=`printf "\033[${color};m%+${align}s\033[0m" "$1"` | |
FORCE_COLOR=1 just $1 2>&1 | sed "s/^/${prefix} │ /;" & | |
shift |
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 | |
while IFS= read -r line; do eval echo "$line"; done < infile > outfile |