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
-- change-screen-by-aspect-ratio.lua | |
-- (c)2023, stt | |
-- | |
-- mpv script for systems with 2+ monitors in portrait and landscape orientation, | |
-- when new video starts in fullscreen the active screen is changed based on | |
-- video's aspect ratio | |
-- | |
-- NOTE: edit the script with screen numbers based on your screen configuration | |
function checkAspectRatio() |
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
#!/bin/bash | |
# Minimal yt-dlp download queue + manager | |
# 2022, <samuli@tuomola.net> | |
# | |
# Requires youtube-dl: | |
# https://github.com/yt-dlp/yt-dlp | |
# and redis: | |
# docker run --name dler_redis -d redis:7 | |
command -v youtube-dl >/dev/null 2>&1 || { echo >&2 "youtube-dl required. Abort."; exit 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
#!/bin/bash | |
## Download youtube transcripts/captions/subtitles | |
## 2021, stt | |
## | |
## NOTE: this is a toy, nothing is guaranteed and it's likely to break when they | |
## change things. seriously, use the API https://developers.google.com/youtube/v3/ | |
## | |
## one dumb way to get video links from the channel page is to run in console: | |
## Array.from(document.querySelectorAll('ytd-browse a.ytd-thumbnail')).map(e => e.href).join(' ') | |
## put it in urls.txt and do |
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
<mamecheat version="1"> | |
<cheat desc="Run, thief, run"> | |
<script state="on"> | |
<action>maincpu.md@0C4A=3C5400CD</action> | |
<action>maincpu.md@0CA4=3D540ACD</action> | |
<action>maincpu.md@0E8F=3D5410CD</action> | |
<action>maincpu.md@0EA2=3C5416CD</action> | |
<action>maincpu.mq@5400=FFFFC901C665823A</action> | |
<action>maincpu.mq@5408=C901D665823AFFFF</action> |
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
""" | |
ra_parse.py | |
2018, <samuli@tuomola.net> | |
Usage: | |
curl -H 'Cookie: RA_User=xxx; RA_Cookie=xxx' "https://retroachievements.org/dorequest.php?r=patch&g=1448&" >ra_game.json | |
python ra_parse.py ra_game.json | |
""" | |
import json | |
import re |
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
# ra_cheevo_lpl.py | |
# 2018, <samuli@tuomola.net> | |
# | |
from urllib.request import Request, urlopen | |
from lxml import html | |
import os | |
def read_lpl(fp): | |
rl = open(fp).readlines() | |
return [rl[i:i+6] for i in range(0,len(rl),6)] |
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
/* | |
The new Paypal UI has lost some important functions that the old UI had, one being purchase history exporting. | |
This is alternative way to export the information: | |
1. open https://www.paypal.com/myaccount/activity | |
2. open your browser's js console (win: ctrl-shift-j, osx: cmd-opt-j) | |
3. copy-paste the following code into js console and execute it | |
*/ | |
j=JSON.parse($('#js_activityView').getAttribute('data-transactions')); |
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 | |
"""Binary parser utility (e.g. for retrieving hiscore from MAME) | |
Copyright (C) 2017 <samuli.tuomola@gmail.com> | |
This program is free software: you can redistribute it and/or modify | |
it under the terms of the GNU General Public License as published by | |
the Free Software Foundation, either version 3 of the License, or | |
(at your option) any later version. |
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 python | |
""" | |
wsdl2raml | |
Tested only with .NET asmx produced WSDL | |
Script output is primarily meant to assist in manual API conversion | |
and as such RAML output is not guaranteed to be valid | |
""" | |
from lxml import etree as ET | |
from textwrap import wrap |
This file has been truncated, but you can view the full file.
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
{ | |
"metadata": { | |
"name": "07_SeeingSound" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ | |
{ |
NewerOlder