Skip to content

Instantly share code, notes, and snippets.

View ptrcnull's full-sized avatar
🏳️‍🌈
she/her

Patrycja ptrcnull

🏳️‍🌈
she/her
View GitHub Profile
@ptrcnull
ptrcnull / hidetpb.user.js
Last active April 9, 2024 02:44
Hide Fake Torrents on The Pirate Bay (fixed)
// ==UserScript==
// @name Hide Fake Torrents on The Pirate Bay
// @namespace https://www.reddit.com/r/Piracy/comments/4w0qix/now_that_kat_is_gone_i_wrote_a_small_script_that/
// @version 2.1
// @description Hide Fake Torrents on The Pirate Bay with Conditional Logic
// @author https://www.reddit.com/user/nicobelic & Bjornskjald
// @match https://thepiratebay.org/*
// @grant none
// @locale English
// ==/UserScript==
@ptrcnull
ptrcnull / bookmarklet
Created August 8, 2018 23:37
pokemongomap.info scrapper
javascript:(function()%7Bvar%20l%3DObject.values(markers).map(m%3D%3E%60%24%7Bm.options.locmarkername%7D%20-%20%24%7Bm._latlng.lat.toFixed(5)%7D%2C%24%7Bm._latlng.lng.toFixed(5)%7D%60).join('%5Cn')%3Bvar%20e%3Ddocument.createEvent('MouseEvents')%3Be.initMouseEvent('click'%2Ctrue%2Cfalse%2Cself%2C0%2C0%2C0%2C0%2C0%2Cfalse%2Cfalse%2Cfalse%2Cfalse%2C0%2Cnull)%3Bvar%20a%3Ddocument.createElement('a')%3Ba.download%3D'locations.txt'%3Ba.href%3D'data%3Atext%2Fplain%3Bcharset%3Dutf-8%2C'%2BencodeURIComponent(l)%3Ba.dispatchEvent(e)%7D)()
@ptrcnull
ptrcnull / bookmarklet
Last active September 18, 2018 10:13 — forked from simeonlg/bookmarklet
Pokemongomap.info scraper
javascript:(function()%7Bvar%20l%3DObject.values(markers).map(m%3D%3E%60%24%7Bm.options.locmarkername%7D%20-%20%24%7Bm._latlng.lat.toFixed(5)%7D%2C%24%7Bm._latlng.lng.toFixed(5)%7D%60).join('%5Cn')%3Bvar%20e%3Ddocument.createEvent('MouseEvents')%3Be.initMouseEvent('click'%2Ctrue%2Cfalse%2Cself%2C0%2C0%2C0%2C0%2C0%2Cfalse%2Cfalse%2Cfalse%2Cfalse%2C0%2Cnull)%3Bvar%20a%3Ddocument.createElement('a')%3Ba.download%3D'locations.txt'%3Ba.href%3D'data%3Atext%2Fplain%3Bcharset%3Dutf-8%2C'%2BencodeURIComponent(l)%3Ba.dispatchEvent(e)%7D)()
@ptrcnull
ptrcnull / bitlbee.c
Last active October 6, 2018 13:02
Facebook API send_message_response
static void
fb_api_cb_publish_ms_r(FbApi *api, GByteArray *pload)
{
FbApiMessage *msg;
FbApiPrivate *priv = api->priv;
FbJsonValues *values;
GError *err = NULL;
JsonNode *root;
if (!fb_api_json_chk(api, pload->data, pload->len, &root)) {
@ptrcnull
ptrcnull / TextUtils.java
Created April 9, 2020 20:11
text utils for bungeecord plugin development
import net.md_5.bungee.api.ChatColor;
import net.md_5.bungee.api.chat.BaseComponent;
import net.md_5.bungee.api.chat.TextComponent;
public class TextUtils {
public static BaseComponent[] trans(String message, Object... args) {
return TextComponent.fromLegacyText(
ChatColor.translateAlternateColorCodes(
'&',
String.format(message, args)
@ptrcnull
ptrcnull / README.md
Last active February 28, 2022 19:45
Booting Alpine Linux with systemd-boot+iPXE

Building

git clone git://git.ipxe.org/ipxe.git
cd ipxe/src
make bin-x86_64-efi/ipxe.efi EMBED=alpine.ipxe

Then, put ipxe.efi on your ESP partition and add alpine.conf to the loader/entries/ directory.

@ptrcnull
ptrcnull / datagrip
Last active April 6, 2022 16:29
JetBrains IDE command-line launcher
#!/bin/sh
ide_name=$(basename $0)
ide_env="$(basename $0 | tr '[a-z]' '[A-Z]')_JDK"
export $ide_env="/usr/lib/jvm/java-11-openjdk"
for x in $HOME/.local/share/$ide_name-*; do
ide_home=$x
done
#!/bin/sh
arch=x86
mirror=http://dl-cdn.alpinelinux.org/alpine/v3.15
wget $mirror/main/$arch/apk-tools-static-2.12.7-r3.apk
mv apk-tools-static-2.12.7-r3.apk apk.tar.gz
gunzip apk.tar.gz
tar xf apk.tar sbin
mv sbin/* /sbin
@ptrcnull
ptrcnull / setup.sh
Last active January 2, 2022 03:16
quick armv7 rootless "chroot" on alpine
sudo apk add qemu-arm qemu-openrc
sudo service qemu-binfmt restart
aria2c https://dl-cdn.alpinelinux.org/alpine/v3.15/releases/armv7/alpine-minirootfs-3.15.0-armv7.tar.gz
dtrx alpine-minirootfs-3.15.0-armv7.tar.gz
rm alpine-minirootfs-3.15.0-armv7.tar.gz
mv alpine-minirootfs-3.15.0-armv7 chroot-arm
echo "nameserver 1.1.1.1" > chroot-arm/etc/resolv.conf
unshare -r -m -R chroot-arm /bin/ash -l
@ptrcnull
ptrcnull / gist:b38a1b63c4acc24d042b0e366bd51ee3
Created January 2, 2022 11:27
MSM8909 firmware load fail
[ 74.091491] subsys-restart: __subsystem_get(): Changing subsys fw_name to venus
[ 74.099321] subsys-pil-tz 1de0000.qcom,venus: venus: Failed to locate venus.mdt
[ 74.099355] msm_vidc: err: Failed to download firmware
[ 74.104061] msm_vidc: err: Failed to load Venus FW
[ 74.104083] msm_vidc: err: Failed to init core, id = 0
[ 74.104117] msm_vidc: err: Failed to move from state: 1 to 3
[ 74.104131] msm_vidc: err: Failed to move video instance to init state
[ 74.104716] msm_vidc: err: Failed to create video instance, core: 0, type = 0