Skip to content

Instantly share code, notes, and snippets.

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

Swyter Swyter

💭
¯\_(ツ)_/¯
View GitHub Profile
@Swyter
Swyter / swy-como-firmar-pdf-cert-linux.md
Last active October 27, 2025 00:44
Cómo firmar electrónicamente un PDF con certificado digital en Linux y que aparezca como LTV (de largo plazo) en Acrobat Reader

Para que la firma digital de un PDF no solo sea válida, sino que tampoco deje de funcionar en unos cuatro años (cuando expire nuestro certificado) y que por lo tanto Acrobat Reader la marque como LTV (long-time validation) necesita adjuntar entre los datos de la firma dos requisitos extra que no están muy bien documentados:

  1. Usar un servidor de marca de tiempo (TSA en inglés) cualificado, de una empresa o servicio respetado, que esté en la lista de la Unión Europea. Es como una especie de notario virtual.
    • Con esto el servicio nos valida que realmente firmamos en ese día y hora, después de la emisión del certificado pero antes de que caduque. Nos da una prueba, una especie de certificado, de que eso (da igual lo que sea, no se mira el contenido) pasó ese día, a esa hora.
  • Sin adjuntar esta contrafirma podríamos rebobinar y cambiar la fecha del ordenador y utilizar certificados caducados o extraviados, por lo que sin la contrafirma de tiempo nuestra firma digital no es tan fiable y el tiempo podría s
@Swyter
Swyter / bbva-account-list-note-scrapper.js
Created July 8, 2025 07:51
Get the un-exportable details like transaction notes and category in the dev tools console.
/* swy: paste on the dev console after the list has finished loading: https://web.bbva.es/index.html?v=30.3.22#accounts/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX */
cur_idx = 0;
expand_arrow_buttons = document.querySelectorAll(
".m-table-body__row span[data-testid=transactions-table-movement-row-detail-link] haunted-icon i.type-icon"
)
function click()
{
@Swyter
Swyter / remove-code-with-copilot.md
Last active October 6, 2025 20:26
Remove the «Code with Copilot Agent Mode» / «Code with agent mode» / «Your Copilot» button spam from GitHub issues

Install uBlock Origin and add this rule to your filters, blocking this cruft even when Copilot has been technically fully-disabled site-wide in your GitHub account options:

github.com##button[data-testid='open-in-copilot-agent-button']:upward(div[data-testid='sidebar-section'])      /* swy: 'Code with agent mode' button in every issue */
github.com##a[href='/settings/copilot'] svg.octicon-copilot:upward(li[class*='prc-ActionList-ActionListItem']) /* swy: 'Your Copilot' option on sidebar */
From 603a46c6cdb031fbc46c309a490c6f72450667a8 Mon Sep 17 00:00:00 2001
From: swyter <[email protected]>
Date: Sat, 5 Oct 2024 23:36:18 +0200
Subject: [PATCH] Stub Linux support.
---
brfAnimation.cpp | 4 ++--
brfBody.cpp | 6 +++---
brfData.cpp | 6 +++---
brfMesh.cpp | 12 ++++++------
#include <stdlib.h>
#include <stdio.h>
int fusb_measure_vbus_bsearch_comp(const void *a, const void *b)
{
long unsigned int index = (long unsigned int) b; float volt = (index * 0.420f);
int val = volt <= 5.040000f ? 0x80 : 0;
printf("-- %u %u %f = %x\n", a, b, volt, val);
@Swyter
Swyter / psvr2.md
Last active June 16, 2025 22:58
PlayStation VR2 Sense controllers · Protocol and input notes · USB & Bluetooth HID packets

One needs to get HID feature report 5 (calibration) to switch each controller into the extended mode, unlike DualShock / DualSense they don't seem to report anything (input doesn't work) in the normal state after just connecting them via standard HID.

  data[00] always 0x31
  data[01] always 0x_1, with the upper byte being an incrementing counter from 0 to 0xf for each packet and wrapping around
  data[02] 0xff - L  / R  stick X-axis, 0 is left, 0xff is right  (analog) (same field for the respective stick in each controller) 
  data[03] 0xff - L  / R  stick Y-axis, 0 is   up, 0xff is  down  (analog) (same field for the respective stick in each controller) 

data[04] 0xff - L2 / R2 trigger pull, from 0 to fully pulled at 0xff (analog)

{
"fus_fixed_key": "hqzdurufm2c8mf6bsjezu1qgveouv7c7",
"fus_flexible_key_suffix": "w13r4cvf4hctaujv"
}
@Swyter
Swyter / farmer-notes.txt
Last active September 2, 2023 03:38
Sphinx -- Heliopolis Farmer Brothers scripting notes
HT_Objective_Hel_Exterior_Farm_PlotTime: in-game timestamp in seconds when they originally started to dig
(gettimer - gPlotTime > 300 seconds) means done
HT_Objective_Hel_Exterior_Farm_FarmerState: 0 = waiting for player to kill all eyes,
1 = waiting in the hut to pick a plot,
2 = walking to farm plot,
3 = digging,
4 = walking back to hut,
5 = waiting for player to give reward
HT_Objective_Hel_Exterior_Farm_Plot: Active/current plot index, from 1 to 16 (this and the one below are set by each plot context action)
HT_Objective_Hel_Exterior_Farm_PlotList: bitfield of spent/dug plots, the set bit index comes from the Farm_Plot objective
# Maintainer: Anastasios Vacharakis <[email protected]>
pkgname=steamdeck-gyrodsu
pkgver=1.0.0
pkgrel=2
pkgdesc="A tool for enabling gyroscopic controls on Steam Deck."
arch=('x86_64')
url="https://github.com/kmicki/SteamDeckGyroDSU"
license=('MIT')
depends=('unzip')
This is intended to be a resource for those who are working on older modifications, or those who are looking to port old modifications to new versions. I dont have anything older than v.0.202, which I just uploaded to the Repository.
[quote=—Viking Conquest—]
[B][U]Installer[/U][/B]
-: [URL=https://web.archive.org/web/20151222180423if_/http://download2.taleworlds.com/mb_warband_viking_conquest_setup_1168_2005.exe]v.2.005[/URL] (1.2 GB)
-: [URL=https://web.archive.org/web/20171028033906if_/http://download2.taleworlds.com/mb_warband_viking_conquest_setup_1168_2012.exe]v.2.012[/URL] (1.2 GB)
-: [URL=https://web.archive.org/web/20160502183549if_/http://download2.taleworlds.com/mb_warband_viking_conquest_setup_1168_2021.exe]v.2.021[/URL] (1.2 GB)
-: [URL=https://web.archive.org/web/20171028092108if_/http://download.taleworlds.com/mb_warband_viking_conquest_setup_1168_2025h.exe]v.2.025[/URL] (1.2 GB)
-: [URL=https://web.archive.org/web/20191226191057if_/http://download2.taleworlds.com/mb_warband_viking_conquest_se