Skip to content

Instantly share code, notes, and snippets.

View Swyter's full-sized avatar
💭
¯\_(ツ)_/¯

Swyter Swyter

💭
¯\_(ツ)_/¯
View GitHub Profile
@Swyter
Swyter / gist:98074d2d42cd7f7c0e5f86ef619969d3
Last active September 24, 2020 19:20
build-discord-rpc-linux-32-bits.sh
git clone https://github.com/discordapp/discord-rpc && cd discord-rpc/
mkdir build && cd build/
cmake -DCMAKE_CXX_FLAGS="-m32 -static-libstdc++ -static-libgcc -Wl,--hash-style=both -flto" -DCMAKE_C_FLAGS="-m32 -static-libstdc++ -static-libgcc -Wl,--hash-style=both -flto" -DBUILD_SHARED_LIBS=ON ..
ldd src/libdiscord-rpc.so
nm src/libdiscord-rpc.so | grep @@GLIBC | sort -t@ -k3,3
strip -R --all src/libdiscord-rpc.so
--
ldd src/libdiscord-rpc.so
@Swyter
Swyter / defined_only_sfx_uniq.txt
Last active March 11, 2019 21:39
Sphinx PC soundbank/sound effect dump listing
SFX_AMB_ACID_POOL
SFX_AMB_BIRDSONG
SFX_AMB_BIRDSONG_MISC
SFX_AMB_BIRDSONG_SEAGULL
SFX_AMB_BIRDSONG_SEAGULL_BUSY
SFX_AMB_BIRDSONG_VULTURE
SFX_AMB_CAVES_DRIP
SFX_AMB_CAVES_DRIP_AUTO
SFX_AMB_CAVES_LOOP
SFX_AMB_DESERT_CICADAS
@Swyter
Swyter / tld_2014-01-14(1).csv
Created March 11, 2019 01:43
TLD - Transifex Glossary backup
term pos comment translation_af comment_af translation_ar comment_ar translation_ar_EG comment_ar_EG translation_ba comment_ba translation_bg comment_bg translation_br comment_br translation_bs comment_bs translation_ca comment_ca translation_cs comment_cs translation_da comment_da translation_de comment_de translation_el comment_el translation_es comment_es translation_et comment_et translation_fa comment_fa translation_fi comment_fi translation_fo comment_fo translation_fr comment_fr translation_he comment_he translation_hr comment_hr translation_hu comment_hu translation_id comment_id translation_it comment_it translation_ja comment_ja translation_ko comment_ko translation_lt comment_lt translation_nb comment_nb translation_nl comment_nl translation_no comment_no translation_pl comment_pl translation_pt comment_pt translation_pt_BR comment_pt_BR translation_ro comment_ro translation_ru comment_ru translation_si comment_si translation_sk comment_sk translation_sl comment_sl translation_sr comment_sr transla
@Swyter
Swyter / get-list-of-reddit-users-commenting-in-thread.js
Created February 15, 2019 17:09
Get a list of reddit users commenting in the current thread. (Paste it in the developer console; if you know what you are doing)
list=[]; for (a of document.querySelectorAll(".commentarea a[href^='https://www.reddit.com/user/']:not([href$='/']):not([href*='/swyter'])")) list.push(a.href.split("/user/")[1]); uniq_list = [...new Set(list)]
l=""; for (a of uniq_list) l+=`/u/${a} `;
@Swyter
Swyter / generate_call_blocklist.sh
Last active February 14, 2019 08:01
CleverDialer Notes
curl --header 'Accept: application/json' --header 'Authorization: Basic Y2RhbmQ6djFna3dpamhzbmdyZ29pNjh6c2Z3Mzh2' 'https://ws.cleverdialer.com/api/1.3/spam?region=ES' -v -o cleverdialer.json
jq .[].normalizedPhone -r cleverdialer.json > blocklist.txt
# swy: `grep +34 | wc -l` reports 2657 local spam numbers vs the 12704 total entries
cat blocklist.txt | grep +34 > NoPhoneSpam_blacklist_es.txt
# swy: convert into https://f-droid.org/packages/at.bitfire.nophonespam's format
sed -i s/$/:\ Clever\ Dialer/ NoPhoneSpam_blacklist_es.txt
# swy: this is kind of (needlessly) slow
@Swyter
Swyter / launch-sphinx-mod.cmd
Last active August 30, 2023 13:49
Easy batch script to locate a Sphinx install from either GOG or Steam and launch it with the current folder as mod. :)
:: sphinx PC install search batch script thingie -- created by swyter in january 2019
:: --
:: run this to automatically find either the GOG or the Steam version of the game (the former has priority)
:: and launch it with the current folder's path in the mod parameter. easy peasy lemon squeezy :)
@echo off && color 71 && mode con: cols=201 lines=12 && cls && title [trying to launch sphinx mod] && chcp 65001 > nul && setlocal EnableExtensions && setlocal EnableDelayedExpansion && setlocal && set arguments="%*"
:: https://stackoverflow.com/a/23328830/674685
https://bordplate.no/blog/en/post/interactive-rop-tutorial/
0000h: 41 41 41 41 41 41 41 41 AAAAAAAA
0008h: 42 42 42 42 42 42 42 42 BBBBBBBB
0010h: 00 00 00 00 00 00 00 20 .......
\x41\x41\x41\x41\x41\x41\x41\x41\x42\x42\x42\x42\x42\x42\x42\x42\x00\x00\x00\x00\x00\x00\x00\x20
0000h: 68 6F 6C 61 63 61 72 61 holacara
0008h: 64 65 62 6F 6C 61 58 44 debolaXD

Bit flags indicating which Mummy and Sphinx animation sets to load on level initialisation. Unless stated otherwise all of them are unused in the PC version. Stored as bits in a decimal number in the Character Anim Files column of LevelData.xls (HT_SpreadSheet_LevelData) from OO_LevelData.elf (HT_File_LevelData).

AnimDataFlag_ExtendedIdle = 0x00000001
AnimDataFlag_HitDie       = 0x00000002
AnimDataFlag_Ledge        = 0x00000004
AnimDataFlag_Climb        = 0x00000008
AnimDataFlag_PushPull     = 0x00000010
AnimDataFlag_Context      = 0x00000020
AnimDataFlag_Subfile07    = 0x00000040
@Swyter
Swyter / record-cinematic-footage-sphinx.md
Last active September 15, 2018 22:06
Recording cinematic game footage in Sphinx and the Cursed Mummy (PC)

Recording cinematic game footage in Sphinx and the Cursed Mummy (PC)

1. Open the configuration file

Install the latest version of the game from Steam or GOG and go to the configuration folder. Depending on your operating system the Sphinx.ini configuration file should be located under the following folders:

  • Windows: %appdata%\Sphinx\Sphinx.ini
  • macOS: ~/Library/Application Support/Sphinx/Sphinx.ini
  • Linux: ~/.local/share/Sphinx/Sphinx.ini
@Swyter
Swyter / The Last Days of the Third Age (WORKSHOP ENG)
Last active August 2, 2018 21:28
TLD Workshop -- title/summary backup
Tolkien-based mod for «[i]Mount&Blade[/i]» and «[i]Mount&Blade: Warband[/i]».
You can also get the mod without using Steam by [url=https://tldmod.github.io]going to our nifty download page[/url].
For updates and feedback you can [url=http://moddb.com/mods/the-last-days]go to our ModDB page[/url] or [url=https://twitter.com/tldmod]follow us on Twitter[/url].
Available in the following languages:
— [img=https://tldmod.github.io/img/en.png] English
— [img=https://tldmod.github.io/img/es.png] Castellano
— [img=https://tldmod.github.io/img/fr.png] Français