Skip to content

Instantly share code, notes, and snippets.

View yoshi314's full-sized avatar

Marcin Kowalski yoshi314

  • PL
View GitHub Profile
@yoshi314
yoshi314 / tape-arc-progress.sh
Created September 28, 2023 12:05
Tape backup script with % capacity tracking per-tape (across sessions)
#!/bin/sh
die() {
echo $@
exit 1
}
which bc || die "no bc found"
if [ $# -lt 2 ] ; then
@yoshi314
yoshi314 / jks-certificate-expiry-checker.sh
Last active July 12, 2022 09:34 — forked from zatarra/jks-certificate-expiry-checker.sh
Small script to check the expiry of all the certificates inside a java keystore.
#!/bin/sh
########################################################
#
# Check certificates inside a java keystore
#
# modifications: better whitespace handling in alias,
# extracts the valid certificates to the disk
########################################################
TIMEOUT="timeout -k 10s 5s "
@yoshi314
yoshi314 / youtube-dl-playlist
Created January 6, 2022 11:19
youtube-parallel-playlist-download
#!/bin/bash
# download youtube playlist in multithreaded fashion
YOUTUBE_DL=yt-dlp
YOUTUBE_DL_ARGS="-x --audio-format mp3 --add-metadata"
JOBS=10
tempfile=$(mktemp)
@yoshi314
yoshi314 / wiifit.py
Last active January 3, 2022 10:52 — forked from tewalds/wiifit.py
Extract weights from Wii Fit
#!/usr/bin/python
# Based on http://www.kellbot.com/2010/05/extracting-graphing-wii-fit-data/
#
# updated for python3
#
# Good references:
# http://jansenprice.com/blog?id=9-Extracting-Data-from-Wii-Fit-Plus-Savegame-Files
# http://stackoverflow.com/questions/616249/wii-fit-data-format
#
# Instructions to use this:
@yoshi314
yoshi314 / teams-profile.sh
Created May 6, 2020 06:43
microsoft-teams-profile-switcher.sh
#!/bin/sh
if [ $# -lt 1 ] ; then
echo "$0 profile_name"
echo "profile directories will be created as needed"
exit 1
fi
# Hostname will be used when links are created in templates (i.e. acknowledge links)
#Hostname = "bosun.example.com"
# The HTTP IP and Port to Listen on. Default is ":8070"
#HTTPListen = ":8080"
# Alert checks are run by default every CheckFrequency * DefaultRunEvery. RunEvery can be overridden
# by indivdual alerts. Defaults are "5m" and 1
CheckFrequency = "1m"
DefaultRunEvery = 5
<html><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"></head><body>string(189)
"SELECT word_id, word_token, word, class, type, country_code, operator,
search_name_count FROM word WHERE word_token in ('
stockholm','stockholm',' 111 64','111 64',' 111','111',' 64','64')"
array(2) {
[0]=&gt;
object(Nominatim\Phrase)#8 (4) {
["sPhrase":"Nominatim\Phrase":private]=&gt;
string(9) "stockholm"
#
# xTreamer SW3
#
"0","a8579f00","a8579f00","power"
"0","d9269f00","a35c9f00","eject"
"0","ba459f00","fa059f00","1"
"0","e8179f00","f6099f00","2"
"0","ed129f00","ea159f00","3"
"0","b04f9f00","fb049f00","4"
# 1 .. bookmark
ba459f00 1/add
0
e8179f00 2/eject
0
ed129f00 3/delete
0
b04f9f00 4/zoom
0
// ==UserScript==
// @name Beachball Loader
// @namespace http://github.com/codeRitter/BeachBall
// @version 1.1
// @description Beachball autoloader for Sandcastle Builder.
// @author codeRitter
// @match http://castle.chirpingmustard.com/castle.html
// @match http://castle.chirpingmustard.com/classic.html
// @grant none
// ==/UserScript==