Skip to content

Instantly share code, notes, and snippets.

! https://gist.github.com/mobiusxs/615fba182817467cb0eef1619c4032d7/edit
myaccounts.navyfederal.org###TopBanneriframe
myaccounts.navyfederal.org###TopBanner
www.creditkarma.com##div.icons.pinned.navi-bar_item:nth-of-type(3) > .hasBadge > .navi-badge
! Reddit
reddit.com##.flairrichtext
reddit.com##.give-gold-button
@heri16
heri16 / 90-mkinitcpio-install.hook.patch
Last active May 29, 2025 22:58
Enable Linux Secure Boot with TPM 2.0 (Manjaro / Archlinux) - rEFInd
--- /usr/share/libalpm/hooks/90-mkinitcpio-install.hook 2020-03-05 12:45:41.000000000 +0800
+++ /etc/pacman.d/hooks/90-mkinitcpio-install.hook 2020-06-13 23:08:32.861202141 +0800
@@ -8,5 +8,7 @@
[Action]
Description = Updating linux initcpios...
When = PostTransaction
-Exec = /usr/share/libalpm/scripts/mkinitcpio-install
+Exec = /usr/local/share/libalpm/scripts/mkinitcpio-install
+Depends = sbsigntools
+Depends = x11-ssh-askpass
@YukiSnowy
YukiSnowy / main.cpp
Last active April 3, 2025 13:45
example SDL2 Vulkan application
// Windows
// g++ *.cpp -o vulkan -lSDL2main -lSDL2 -lvulkan-1
// Linux
// g++ *.cpp -o vulkan -lSDL2main -lSDL2 -lvulkan
// https://vulkan-tutorial.com/
#include <iostream>
using namespace std;
#include <SDL2/SDL.h>
@djfdyuruiry
djfdyuruiry / README.md
Last active October 8, 2024 04:54
WSL 2 - Enabling systemd

Enable systemd in WSL 2

NOTE: If you have Windows 11 there is now an official way to do this in WSL 2, use it if possible - see MS post here (WINDOWS 11 ONLY)

This guide will enable systemd to run as normal under WSL 2. This will enable services like microk8s, docker and many more to just work during a WSL session. Note: this was tested on Windows 10 Build 2004, running Ubuntu 20.04 LTS in WSL 2.

  • To enable systemd under WSL we require a tool called systemd-genie

  • Copy the contents of install-sg.sh to a new file /tmp/install-sg.sh:

@ld100
ld100 / ArchLinuxWSL2.md
Last active September 14, 2025 12:21
Steps for setting up Arch Linux on WSL2

Migrating from Ubuntu on WSL to ArchLinux on WSL2

Obsolete notice

This document was created back in 2020 and might not be actual nowadays. It is not supported anymore, so use thise information at your own risk.

Upgrading to WSL 2

  • Download WSL2 Kernel
  • run wsl --set-default-version 2 in windows command line, so that all future WSL machine will use WSL2.
@bens
bens / hellosdlgl31.zig
Created May 10, 2020 14:36
Hello World for OpenGL 3.3 with SDL2 in ziglang
const std = @import("std");
const Allocator = std.mem.Allocator;
const c = @cImport({
@cInclude("./gl_core_3_3.h");
@cInclude("SDL2/SDL.h");
@cInclude("SDL2/SDL_opengl.h");
});
const SDLError = error{
FailedInit,
@Jacob-Tate
Jacob-Tate / snippet.cpp
Created December 4, 2019 06:18
Get EXE Location C++
//Returns the absolute path of the executable
std::filesystem::path file_manip::abs_exe_path()
{
#if defined(_MSC_VER)
wchar_t path[FILENAME_MAX] = { 0 };
GetModuleFileNameW(nullptr, path, FILENAME_MAX);
return std::filesystem::path(path);
#else
char path[FILENAME_MAX];
ssize_t count = readlink("/proc/self/exe", path, FILENAME_MAX);
@eviltester
eviltester / gist:11093f0e4c501a41990e227393184eda
Last active October 14, 2025 14:39
uncheck twitter interests
var timer=100;document.querySelectorAll("div > input[type='checkbox']:checked").forEach((interest) => {setTimeout(function(){interest.click()},timer);timer+=2000;});
@Checksum
Checksum / websocket_proxy.js
Last active June 22, 2025 02:35
Intercepting WebSockets in the browser using JavaScript
const WebSocketProxy = new Proxy(window.WebSocket, {
construct(target, args) {
console.log("Proxying WebSocket connection", ...args);
const ws = new target(...args);
// Configurable hooks
ws.hooks = {
beforeSend: () => null,
beforeReceive: () => null
};
@bronze1man
bronze1man / AesCtr.cs
Last active July 24, 2024 08:59
c# aes ctr implement works on vs2017/uwp , seen testRun for usage example.
using System.Security.Cryptography;
using System.Diagnostics;
using System;
using System.Runtime.InteropServices.WindowsRuntime;
namespace abc {
public sealed class AesCtr {
public static void testRun() {
for (var i2 = 0; i2 < 3; i2++) {
var outputV = Encrypt(new byte[32], new byte[16], new byte[30]);