Skip to content

Instantly share code, notes, and snippets.

View codehz's full-sized avatar
🔮

Neko Hz codehz

🔮
View GitHub Profile
@hoehrmann
hoehrmann / sqlite3_profile.c
Last active March 15, 2023 23:02
Quick and dirty LD_PRELOAD SQLite query logger/profiler
// This is now https://github.com/federlieb/federprof
@danvy
danvy / WSL2-Net-Fix.ps1
Created September 5, 2020 21:04
Reset your WSL network connection trying to fix WSL2 media disconnected error
# Check these threads before proceeding:
# https://github.com/microsoft/WSL/discussions/5857
# https://github.com/microsoft/WSL/issues/5821
if (-Not ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] 'Administrator')) {
$CmdLine = "-File `"" + $MyInvocation.MyCommand.Path + "`" " + $MyInvocation.UnboundArguments
Start-Process -FilePath PowerShell.exe -Verb Runas -ArgumentList $CmdLine
Exit
}
# Restart the Host Network Service
Restart-Service -Force -Name hns
@Jack-Works
Jack-Works / npm.detect.js
Last active March 24, 2022 03:18
npm-detect.js
// ==UserScript==
// @name NPM detect ESM TS sideEffects
// @namespace http://tampermonkey.net/
// @version 0.3
// @description
// @author Jack Works
// @match https://www.npmjs.com/*
// @grant GM_xmlhttpRequest
// @require https://unpkg.com/@holoflows/kit@0.6.0
// @connect unpkg.com
@codehz
codehz / installation.md
Last active September 22, 2019 23:22
StoneServer

codehz/StoneServer
codehz/stoneserver
You can find docker-compose.yml file in the github repo.

This tutorial is written for user that don't want to use Docker (or Archlinux).

Prerequirement

git cmake make or ninja jq curl redis-server

Minecraft 1.9.0.15 x86 apk

@adamdriscoll
adamdriscoll / New-Detour.ps1
Created July 28, 2016 17:45
Example of how to use EasyHook with powershell to override GetSystemTimeAsFileTime
function New-Detour
{
param(
$Library,
$FunctionName,
[ScriptBlock]$Detour,
[String[]]$ReferencedAssemblies
)
#Download from easyhook.codeplex.com
@mmozeiko
mmozeiko / incbin.c
Last active December 7, 2023 04:10
Include binary file with gcc/clang
#include <stdio.h>
#define STR2(x) #x
#define STR(x) STR2(x)
#ifdef _WIN32
#define INCBIN_SECTION ".rdata, \"dr\""
#else
#define INCBIN_SECTION ".rodata"
#endif