Skip to content

Instantly share code, notes, and snippets.

View szkrd's full-sized avatar

szabolcs kurdi szkrd

  • tralfamadore
View GitHub Profile
@szkrd
szkrd / eweadn-cr87.md
Last active August 27, 2024 17:48
Eweadn CR87 mechanical keyboard instructions

Eweadn CR87 mechanical keyboard instructions

Keyboard shortcuts

FN +

  • F1 = brightness -
  • F2 = brightness +
  • F3 = calculator
  • F4 = my computer
@szkrd
szkrd / soundcore-a40.md
Created June 10, 2024 17:43
anker soundcore space a40 quick start guide

anker soundcore space a40

  • app
    1. noise cancellation
    2. sound transparency mode
    3. ldac quality (android 8+)
  • power off
    1. put back into box
    2. close lid
  • reset

creating a pixelated font from a tilemap

software needed

  1. imagemagick
  2. potrace

1. download the fontmap

@szkrd
szkrd / npr-100-scifi-fantasy.md
Last active October 20, 2024 07:49
NPR Top 100 Science-Fiction, Fantasy Books

SF Masterworks

Details: https://en.wikipedia.org/wiki/SF_Masterworks

  • 334 - Thomas Disch
  • A Canticle for Leibowitz - Walter M. Miller Jr.
  • A Case of Conscience - James Blish
  • A Deepness in the Sky - Vernor Vinge
  • A Fall of Moondust - Arthur C. Clarke
  • A Fire Upon the Deep - Vernor Vinge
@szkrd
szkrd / news.js
Created March 18, 2023 10:58
the proper amount of daily news
#!/usr/bin/env -S node --no-warnings
const { JSDOM } = require("jsdom");
const ua = 'Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/110.0';
function listHeadlines(url, title, selector) {
return fetch(url, { headers: { "User-Agent": ua}}).then((res) => res.text()).then((text) => {
const doc = (new JSDOM(text)).window.document;
const titles = Array.from(doc.querySelectorAll(selector)).map(el => el.textContent.trim());
console.log(`====== [${title}] ======`);
titles.forEach((text) => console.log(`* ${text}`));
});
@szkrd
szkrd / ice.md
Last active January 29, 2023 10:36
From roller skates to ice skates

From roller skates to ice skates

If you're reading this because we talked at the course held by Aya & Angela, Glide Roller Skating (GRS), then you can find me on facebook, but I comment from time to time at the (mostly Hungarian) group Dunaguri.

Angela is active in the Artistic Roller Skating group as well, but I'll miss their lessons greatly and it saddens my heart to loose such wonderful teachers. I'm a novice, I started roller skating early 2022 and while I practice a lot, please take what I say with a grain salt, there are hundred times better and better informed skaters out there.

@szkrd
szkrd / monswap-top-bottom.ahk
Created September 9, 2022 21:45
Swap all windows between two vertical monitors (2nd top, primary 1st bottom)
; MonSwap - Swaps all the application windows from one monitor to another.
; see: https://www.autohotkey.com/boards/viewtopic.php?t=68311
; v1.0.0 Author: Alan Henager
; v1.0.1 Xenrik - Updated to use relative screen size when swapping
; v1.0.2 Boiler, Masgo - exclude Windows 10 secondary monitor taskbar from being swapped
; v1.0.3 Szkrd - dumbing it down for two vertical monitors, 1 below, 2 above
; +-------+
; | 2 |
; +-------+
; +-------+
@szkrd
szkrd / forward-rot.js
Last active March 2, 2022 13:18
bi-directional port forwarding with a dumb rot13 cypher
// this is a very simple implementation of rot13 cypher over sockets, to avoid primitive
// deep packet inspection (https://gist.github.com/gmurdocca/88857b58dc4668d88b0d0fae6ebf8b64);
// a more robust solution would be to use obs4 (https://github.com/Yawning/obfs4), which
// implements the ScrambleSuit protocol as a tor transport plugin with a standalone
// runner/wrapper (for example https://github.com/twisteroidambassador/ptadapter in python)
const net = require('net');
const parseIpPort = (s = '') => ({ ip: s.split(':')[0], port: parseInt(s.split(':')[1], 10) });
const addrs = { from: parseIpPort(process.argv[2]), to: parseIpPort(process.argv[3]) };
const ports = { from: addrs.from.port, to: addrs.to.port }
const hosts = { from: addrs.from.ip, to: addrs.to.ip }
@szkrd
szkrd / forward.js
Created February 22, 2022 19:50
Wait for interface to come up then start forwarder to local server (windows).
const net = require('net');
const spawn = require('child_process').spawn;
const ports = [80, 5000];
const sleepSecs = 30;
const interfaceMatcher = /(169\.254\.[\d\.]+)/;
function doForward(listenInterface = '0.0.0.0') {
const server = net.createServer(function (from) {
const to = net.createConnection({ host: '127.0.0.1', port: ports[1] });
from.pipe(to).on('error', (err) => console.log('from error', err.code));