Skip to content

Instantly share code, notes, and snippets.

View ifthenelse's full-sized avatar
🏎️
LIFE BE LIKE

Andrea Collet ifthenelse

🏎️
LIFE BE LIKE
View GitHub Profile
@ifthenelse
ifthenelse / msteams-transcript-extractor.js
Last active March 4, 2026 22:49
Microsoft Teams Transcript Extractor v1.6 - Extract transcripts from MS Teams chats ad download them as timestamped TXT files. Just open MS Teams for web, browse to the meeting transcript screen and run this script.
(async () => {
"use strict";
const CONFIG = {
selectors: {
statusTitle: '[data-testid="panel-status-page-title-text"]',
meetingTitle: '[data-tid="chat-title"] span[title]',
meetingTime: '[data-tid="intelligent-recap-header"] span',
meetingRecurrence: '[data-tid="recap-tab-list"] button[role="tab"][aria-selected="true"] span[dir="auto"]',
chatTab: 'button[data-tid="tab-item-com.microsoft.chattabs.chat"]',
@ifthenelse
ifthenelse / ncdu-top-dirs.zsh
Created January 1, 2026 10:30
ZSH script that scans a target path with ncdu, exports the full scan as JSON, then extracts the TOP N largest directories by *disk usage* (ncdu "dsize", not apparent size). Requires ncdu and jq
#!/usr/bin/env zsh
set -euo pipefail
# -----------------------------------------------------------------------------
# ncdu-top-dirs.zsh
#
# Scans a target path with ncdu, exports the full scan as JSON, then extracts
# the TOP N largest directories by *disk usage* (ncdu "dsize", not apparent size).
#
# Requirements:
@ifthenelse
ifthenelse / pdfunlock.zsh
Last active December 22, 2025 10:47
ZSH script to unlock all PDF files in the current directory using a single password
#!/usr/bin/env zsh
set -u
setopt extendedglob nullglob
SCRIPT_NAME=${0:t}
usage() {
cat <<EOF
Usage: $SCRIPT_NAME [options] [input_dir]
@ifthenelse
ifthenelse / .terserrc.js
Last active December 19, 2025 16:41
Terser options for bookmarklets
{
module: false, // bookmarklets are usually classic scripts, not ESM
parse: {
ecma: 2020
},
compress: {
ecma: 2020,
passes: 2,
@ifthenelse
ifthenelse / twitchAutoClaimer.js
Last active December 13, 2025 14:13
Twitch bookmarklet to auto-claim points
javascript: (() => {
const KEY = "__twitchAutoClaimer";
if (window[KEY]?.stop) {
window[KEY].stop(false);
return;
}
const state = {
start: new Date(),
checks: 0,
@ifthenelse
ifthenelse / check_binance_authenticated_api_request.zsh
Last active January 30, 2024 14:02
Small script that uses jq to check the success of an authenticated request to Binance API key with the API key and Secret used in a specific Freqtrade configuration file. Usage ./check_binance_authenticated_api_request.zsh path/to/your-ftbot-config-file.json
#!/bin/zsh
# Check if jq is installed
if ! command -v jq &> /dev/null; then
echo "Error: jq is not installed. Please install it before continuing."
exit 1
fi
# Check if a configuration file name is provided
if [[ -z $1 ]]; then
@ifthenelse
ifthenelse / freqtrade_docker_bots_strategy_update_cronjob
Last active January 29, 2024 07:55
freqtrade docker bots strategy update cronjob
#!/bin/zsh
# Force pairlist/blacklists and strategies update?
FORCEUPDATE=0
# Add git commits
ADDGITCOMMITS=0
# Default root path
ROOT_PATH="${HOME}"
@ifthenelse
ifthenelse / tinyInspector.js
Last active November 14, 2019 04:39
A cross-browser tiny DOM inspector to use as a bookmarklet when inspection on is forbidden
function onTinyInspectorMouseOver(evt) {
if (evt.target == p || evt.target == c) { return; }
p.innerHTML = evt.target.tagName + " " + evt.target.className;
c.innerHTML = window.getComputedStyle(evt.target).getPropertyValue("width") + " x " + window.getComputedStyle(evt.target).getPropertyValue("height");
evt.target.style.backgroundColor = "rgba(255, 0, 0, 0.15)";
evt.target.style.border = "1px solid rgba(255, 0, 0, 0.5)";
}
function onTinyInspectorMouseOut(evt) {
if (evt.target == p || evt.target == c) { return; }
@ifthenelse
ifthenelse / webvideo.zsh
Created November 16, 2018 13:32
Create compressed versions of video in mp4 and webm formats using zsh and ffmpeg
#!/bin/env zsh
# create webm and mp4 web version of video
webvideo() {
if [ -z "$1" ]; then
printf "\Video source not set\n"
exit 1
fi
SOURCE="$1"
@ifthenelse
ifthenelse / wordpress-docker.sublime-project
Created September 26, 2018 12:07
wordpress-docker.sublime-project
{
"folders": [
{
"file_exclude_patterns": [
"*.sublime-*",
"*.pyc",
"*.pyo",
"*.exe",
"*.dll",
"*.obj",