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 | |
#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 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
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 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
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 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 | |
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 |
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
curl --silent "https://m.geograph.org.uk" | termux-wallpaper -u "https://geograph.org.uk$(curl --silent "https://www.geograph.org.uk/more.php?id=$(grep -oP 'daily.php.+/photo/\K([0-9]{1,})')" | grep original | grep -oP '(/reuse.php[^"]{1,})')" |
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
#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 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 | |
# encoding: utf-8 | |
#FIXME: move this to an variables.env file | |
REQUEST_THROTTLE="${REQUEST_THROTTLE:-0}" | |
function debug() { | |
if [ "$DEBUG" == "1" -o "$DEBUG" == "true" -o "$DEBUG" == "TRUE" ]; then | |
echo -e "$@" 1>&2 | |
fi |
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 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 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
MIT License | |
Copyright © 2018, 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 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
# config/locales/en.yml | |
en: | |
i18n: | |
language: | |
name: 'English' |