Skip to content

Instantly share code, notes, and snippets.

View xWTF's full-sized avatar

xWTF xWTF

  • Shimo-kitazawa
View GitHub Profile
@xWTF
xWTF / Access-Pageant-from-WSL1.md
Last active February 11, 2024 15:44
Access your Pageant from WSL 1

Here's an extremely simple way to access your Pageant SSH agent (such as the GPG one, so you can use your Yubikey or whatever in WSL) from WSL 1.

Install

Assume you're using the root account.

# In WSL
curl -Lo yolo-ssh-agent.go https://gist.github.com/xWTF/2f74d78da32e361a883f440d19e705d9/raw/yolo-ssh-agent.go
mkdir -p ~/.local/
@xWTF
xWTF / generate_shim.py
Last active February 17, 2024 07:13
Yet Another Windows Shim Wrapper Solution. Chocolatey's shimgen https://github.com/chocolatey/shimgen is not FOSS, so I made one.
"""
Get updates from [this gist](https://gist.github.com/xWTF/3c07aec941bbe13a9b78a37cebd9ae9b)
Copyright © 2023 xWTF
This work is free. You can redistribute it and/or modify it under the
terms of the Do What The Fuck You Want To Public License, Version 2,
as published by Sam Hocevar. See the COPYING file or http://www.wtfpl.net/
for more details.
"""
@xWTF
xWTF / stash-userscript-sfw.js
Created January 30, 2023 12:40
Stash User Scripts
// Enables you to blur all images & replace title with SFW text
// Usage: enableSFW() in console
(function () {
const TITLE = ['Blue Puya', 'Parrot’s Beak', 'Middlemist Red Camellia', 'Queen of the Night', 'Catherine-Wheel Pincushion', 'Ghost Orchid', 'Darwin’s Slippers', 'Jade Vine', 'Lady’s Slipper Orchids', 'Purple Passionflower', 'Himalayan Poppy', 'Chocolate Cosmos', 'Bleeding Heart', 'Crown Imperial', 'Pitcher Plants', 'Sea Holly', 'Calla Lilies', 'Bird of Paradise', 'Ginger Flowers', 'Anthurium', 'Lobster Claws', 'Corpse Flower', 'Stinking Corpse Lily', 'Surprise Lily', 'Silk Tree', 'Black Bat Flower', 'Girlfriend Kiss'];
const random = (item) => item[Math.floor(Math.random() * item.length)];
const canvas = document.createElement("canvas"), ctx = canvas.getContext('2d', {
willReadFrequently: true,
});
window.enableSFW = () => {
@xWTF
xWTF / wireshark-dissector-yamux.lua
Last active November 19, 2022 14:22
Wireshark Lua Dissector: Yamux (Yet another Multiplexer) by HashiCorp
--[[
Wireshark Lua Dissector
Protocol: [Yamux](https://github.com/hashicorp/yamux) by HashiCorp
Get updates from [this gist](https://gist.github.com/xWTF/e124db3e48abc92184e583168fea5edb)
Copyright © 2022 xWTF
This work is free. You can redistribute it and/or modify it under the
terms of the Do What The Fuck You Want To Public License, Version 2,
as published by Sam Hocevar. See the COPYING file or http://www.wtfpl.net/
for more details.
@xWTF
xWTF / Surge LAN Override.js
Last active November 12, 2022 07:47
Surge LAN override script: Module & Outbound
// Setup your SSIDs here
const LAN_SSID = ['My SSID 1', 'My SSID 2'];
const api = (method, path, submit = null) => new Promise(resolve => $httpAPI(method, path, submit, data => resolve(data)));
async function ensureModuleStatus(module, status) {
const data = await api('GET', 'v1/modules');
if (status != data.enabled.includes(module)) {
await api('POST', 'v1/modules', { [module]: status });
@xWTF
xWTF / zabbix-agent-http-processor.js
Created February 12, 2022 05:17
Zabbix web.page.get chunked response preprocessor
/*
Copyright © 2022 xWTF
This work is free. You can redistribute it and/or modify it under the
terms of the Do What The Fuck You Want To Public License, Version 2,
as published by Sam Hocevar. See the COPYING file or http://www.wtfpl.net/
for more details.
*/
// Usage: Create a Javascript preprocessor and copy paste function body into it
function preprocessor() {