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
#TODO: support WSL's $WT_SESSION and tmux panes ($TMUX_PANE?) | |
if [ "$TERM_SESSION_ID" != "" ]; then | |
if [ "$HISTFILE" != "" ]; then | |
OLD_HISTFILE="$HISTFILE" | |
else | |
OLD_HISTFILE="~/.bash_history" | |
fi | |
HISTFILE_DIRECTORY="${HOME}/.histories/bash_histories" | |
mkdir -p "$HISTFILE_DIRECTORY" |
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 | |
#encoding: utf-8 | |
#Shell script to download freely released Studio Ghibli images (http://www.ghibli.jp/info/013344/) | |
film_names=( "marnie" "kaguyahime" "kazetachinu" "kokurikozaka" "karigurashi" "ponyo" "ged" "chihiro") | |
for film_name in "${film_names[@]}"; do | |
mkdir -p "./${film_name}" && curl "http://www.ghibli.jp/images/${film_name}.jpg" -o "./${film_name}/${film_name}.jpg" && curl "http://www.ghibli.jp/gallery/${film_name}[001-050].jpg" -H "Referer: http://www.ghibli.jp/works/${film_name}/#frame" -o "./${film_name}/${film_name}-#1.jpg" | |
done |
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 python3 | |
# encoding: utf-8 | |
# NOTE: THIS VERSION HAS BEEN MADE OBSOLETE BY THIS REPOSITORY: https://github.com/FiXato/tui_launcher | |
from math import floor | |
import argparse | |
import urwid | |
import asyncio | |
urwid.set_encoding("utf8") | |
arg_parser = argparse.ArgumentParser(description='Launch tools via buttons.') | |
arg_parser.add_argument('--term-width', nargs=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
import pyautogui | |
pyautogui.FAILSAFE = False | |
from pyautogui import press, FAILSAFE | |
from morse3 import Morse as m | |
from bs4 import BeautifulSoup | |
import urllib.request | |
from time import sleep | |
URL = "https://medium.com/risan/upgrade-your-ssh-key-to-ed25519-c6e8d60d3c54" | |
req = urllib.request.Request( |
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
// ==UserScript== | |
// @name Comics tweaks | |
// @author Filip H.F. "FiXato" Slagter | |
// @namespace http://code.fixato.org/userscripts | |
// @description Some tweaks for various comic sites, such as visible alt text, and kiosk mode. Currently supports: Oglaf, xkcd. | |
// @match https://oglaf.com/* | |
// @match https://www.oglaf.com/* | |
// @match https://xkcd.com/* | |
// @match https://www.xkcd.com/* | |
// @version 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
namespace eval autopause { | |
proc autopause {} { | |
message "pause: [set ::pause]" | |
::set ::pause true | |
}; | |
after realtime 0.1 autopause::autopause | |
}; |
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
MIT License | |
Copyright (c) 2020 Filip H.F. "FiXato" Slagter | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
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
function process_group(name, body) { | |
size = gensub(/.+\nSize = ([0-9]+)\n.+/, "\\1", "G", body); | |
crc = gensub(/.+\nCRC = ([A-F0-9]{8})\n.+/, "\\1", "G", body); | |
packed = gensub(/.+\nPacked Size = ([0-9]+)\n.+/, "\\1", "G", body); | |
modified = gensub(/.+\nModified = ([A-F0-9]{8})\n.+/, "\\1", "G", body); | |
id = crc "-" size; | |
uniques[id]++; | |
data[id]["size"] = size; |
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
namespace eval lets_play { | |
set debug_log 1 | |
proc log {args} { | |
variable debug_log | |
if {$debug_log != 1} { return } | |
puts "DEBUG: $args" | |
} | |
proc position_to_time {position} { | |
if {[string is double $position] == 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 | |
PATH_TO_IRFANVIEW="${HOME}/iview454_setup/i_view32.exe" | |
tmpfilelist="$(mktemp "${TMP}/toot_media_viewer.XXXXXX.filelist.txt")" | |
tmpfilelist_win="$(mktemp "${TMP}/toot_media_viewer.XXXXXX.win.filelist.txt")" | |
# Loop through all arguments passed to the script, assuming they are all URLs | |
for url in "$@" | |
do | |
basename="$(basename "$url")" | |
# Get the extension from the URL's basename. Default to 'png' if basename has no period |