Skip to content

Instantly share code, notes, and snippets.

View rokobuljan's full-sized avatar

Roko C. Buljan rokobuljan

View GitHub Profile
@rokobuljan
rokobuljan / qson.js
Created November 20, 2023 02:02
Concurrently (simultaneously) update JSON files via queue mechanism. [nodejs] [js] [json]
import fs from "fs-extra";
/**
* Concurrently (simultaneously) update JSON files via queue
* @example
* ```js
* import { QSON } from "./qson.js";
* const qconf = new QSON("./config.json");
*
* // Clear current file's data
@slimsag
slimsag / ramblings.md
Last active December 13, 2023 08:02
Because cross-compiling binaries for Windows is easier than building natively

Because cross-compiling binaries for Windows is easier than building natively

I want Microsoft to do better, want Windows to be a decent development platform-and yet, I constantly see Microsoft playing the open source game: advertising how open-source and developer friendly they are - only to crush developers under the heel of the corporate behemoth's boot.

The people who work at Microsoft are amazing, kind, talented individuals. This is aimed at the company's leadership, who I feel has on many occassions crushed myself and other developers under. It's a plea for help.

The source of truth for the 'open source' C#, C++, Rust, and other Windows SDKs is proprietary

You probably haven't heard of it before, but if you've ever used win32 API bindings in C#, C++, Rust, or other languages, odds are they were generated from a repository called microsoft/win32metadata.

<?php
$secret = 'secret key';
list($hashAlgo, $signature) = explode('=', $_SERVER['HTTP_X_HUB_SIGNATURE']);
$payload = $HTTP_RAW_POST_DATA ?: file_get_contents('php://input');
$compute = hash_hmac($hashAlgo, $payload, $secret);
$valid = hash_equals($compute, $signature);
if ($valid === false) {
@hofmannsven
hofmannsven / README.md
Last active March 22, 2024 19:45
Git CLI Cheatsheet
@myyc
myyc / arch_linux_install_guide.md
Last active March 27, 2024 01:44
Arch Linux setup with all the good stuff (Plymouth, encryption, systemd-boot etc.)

Hope this will stay relevant for longer than just 2021. This guide will focus mostly on things you shouldn't overlook and will harshly prioritise assuming that you're running on recent hardware. EFI and all that.

Always refer to the official guide in case of doubt.

First things first

One important thing first: the environment you will encounter on the live image is very different from what you'll end up installing, some things are significantly easier there: e.g. wifi tools come pre-installed, the default shell is a pimped zsh with nice completions, and so on. We'll keep this