Skip to content

Instantly share code, notes, and snippets.

@jaxFF
jaxFF / ssh-copy-id-openwrt
Created August 23, 2023 11:10 — forked from Juul/ssh-copy-id-openwrt
ssh-copy-id but for openwrt / dropbear
#!/bin/sh
if [ "$#" -ne 1 ]; then
echo "Example: ${0} root@192.168.1.1"
exit 1
fi
cat ~/.ssh/id_rsa.pub | ssh ${1} "cat >> /etc/dropbear/authorized_keys && chmod 0600 /etc/dropbear/authorized_keys && chmod 0700 /etc/dropbear"
#!/bin/bash
set -xe
cwd="$HOME/wg_data"
if [ "$(id -u)" -ne 0 ]; then echo "script must be ran under root" >&2; exit 1; fi
# TODO: don't remove last ip -- support adding clients post-install
# TODO: actually use cwd?
# upgrade kernel and install deps
@jaxFF
jaxFF / patch_v7.40_5000.1337
Last active July 5, 2024 09:58
Reverse engineered HWiNFO 12-hour shared memory limit patch
>hwinfo64.exe
000000000022005C:3D->90
000000000022005D:00->90
000000000022005E:2E->90
000000000022005F:93->90
0000000000220060:02->90
0000000000220061:0F->E9
0000000000220062:86->81
0000000000220063:80->00
@jaxFF
jaxFF / dll.cpp
Created May 23, 2023 19:29
shared interfacing
#include "shared.h"
global string DllInterfaceName = {"dll_001", 7};
#ifndef DLL_C
#define DLL_C
// Start compilation unit
#define MAIN_C
#include "main.c"
## POSIX Specific Timer:
#ifndef POSIX_SPECIFIC_H
#define POSIX_SPECIFIC_H
#include <unistd.h>
#include <sys/time.h>
#include <time.h>
global b32 posix_global_init = false;