Skip to content

Instantly share code, notes, and snippets.

View 641i130's full-sized avatar
🦀
Rewrite it in rust!

Caret 641i130

🦀
Rewrite it in rust!
View GitHub Profile
@NSG650
NSG650 / WindowFocusLogger.c
Last active August 28, 2024 13:28
Logs which processes have received window focus
#include <stdio.h>
#include <Windows.h>
VOID CALLBACK WinEventProcHook(HWINEVENTHOOK hWinEventHook, DWORD event, HWND hwnd,
LONG idObject, LONG idChild, DWORD idEventThread, DWORD dwmsEventTime) {
DWORD ProcessId = 0;
if (GetWindowThreadProcessId(hwnd, &ProcessId) != 0) {
HANDLE ProcessHandle = OpenProcess(PROCESS_QUERY_LIMITED_INFORMATION, FALSE, ProcessId);
if (ProcessHandle != (HANDLE)(-1)) {
char buffer[MAX_PATH] = {0};
@kalomaze
kalomaze / llama_sillytavern_guide.md
Last active September 14, 2024 16:36
Simple Llama + SillyTavern Setup Guide

Simple Llama + SillyTavern Setup Guide

This guide is meant for Windows users who wish to run Facebook's Llama AI language model on their own PC locally. Our focus will be on character chats, reminiscent of platforms like character.ai / c.ai, using Llama architecture models. Most recently, in late 2023 and early 2024, Mistral AI has released high quality models that are based of the Llama architecture, and will work in the same way if you choose to use them.

  • Requirements

    • Windows operating system (may make Mac version of the guide later)
    • GPU with at least a few gigabytes of VRAM (NVIDIA graphics cards recommended)
  • Sufficient regular RAM for a model (system memory)

@mttaggart
mttaggart / electron-versions.csv
Last active August 27, 2024 23:34
CVE-2023-4863 Electron App Tracker | THIS LIST IS NOW DEPRECATED. PLEASE VISIT https://github.com/mttaggart/electron-app-tracker FOR THE LATEST DATA
app_name repo electron_version vulnerable
1Clipboard https://github.com/wiziple/1clipboard
1Password None 25.8.1 FALSE
3CX Desktop App 19.0.8 TRUE
5EClient None
Abstract None
Account Surfer None
Advanced REST Client https://github.com/advanced-rest-client/arc-electron ^17.0.0 TRUE
Aedron Shrine None
Aeon https://github.com/leinelissen/aeon 23.2.0 TRUE
@Saren-Arterius
Saren-Arterius / Waydroid.sh
Last active September 26, 2024 01:05
Install Waydroid on Steam Deck (As of 2024-03-16)
#!/bin/sh
cage -- bash -c 'wlr-randr --output X11-1 --custom-mode 1280x800; sleep 1; sudo /usr/local/bin/waydroid-helper & waydroid show-full-ui'

UPS Shutdown Scripts

This documents everything I needed to get my Proxmox instance to listen to my UPS Server and initiate a shutdown script that would shutdown my UDM Pro. This is needed as the UDM Pro does not have the ability to listen to a NUT server on it's own (what the hell ubiquiti).

I'm using a Synology NAS as a NUT server, but you can point your NUT client to any supported UPS. It's set to alert any clients subscribed to it when the UPS connected to it is in low battery. This all applies regardless of what machine you have a NUT server on, it does not have to be Synology.

Additionally these install steps were on my Proxmox machine, but these steps will probably work on any Debian GNU/Linux OS with little to no modification. YMMV

High level summary of the steps:

  • Install the NUT client on Proxmox
@NatoBoram
NatoBoram / Public IPFS Gateway.md
Last active September 19, 2024 13:37
The complete guide to hosting a public IPFS gateway

Hosting a public IPFS gateway

This guide assumes that you've used ssh before. If not, then you must read How to Set Up SSH Keys.

I'm also going to assume you've used ipfs before. If not, then take some time to discover IPFS with IPFS Desktop, IPFS Companion and go-ipfs!

Get a host

A public IPFS gateway can be hosted at home or on the cloud.

@sixels
sixels / Arch Secure Laptop Install.md
Last active February 15, 2024 01:01 — forked from Th3Whit3Wolf/Arch Secure Laptop Install.md
My install instruction for a secure Arch Linux (sway) laptop workstation

What's Cool

  • Encrypted root partition
    • AES-256 bit cipher
    • Argon2id variant for PBKDF
    • Sha3-512 bit hash
  • rEFInd bootloader
    • With dreary theme
    • Optimal Settings (optimized for aesthetics, and boot time)
  • Boot into backups thanks to refind-btrfs
@imneonizer
imneonizer / ipwebcam.sh
Last active January 3, 2023 04:12
Using Android as HD webcam
#!/bin/bash
export ANDROID_SERIAL=`adb devices -l | grep -i oneplus | awk '{print $1}'`
export HOST_PORT=8080
export IPWEBCAM_PORT=8080
export V4L2_DEVICE=/dev/video0
function start_screen_mirror(){
if [ ! `pgrep scrcpy` ];then
@govorox
govorox / flash_wic_file
Created September 2, 2021 09:02
Flash Yocto WIC file to SD card
gunzip -c <IMAGE>.wic.gz | sudo dd of=/dev/sdX bs=1M iflag=fullblock oflag=direct conv=fsync
Optional:
status=progress
bs=4M
@Pldare
Pldare / aes.cs
Created August 10, 2021 01:46
vroid web view vrm decrypt
using System;
using System.Security.Cryptography;
using System.IO;
using System.IO.Compression;
namespace Vroid
{
class Vroiddec
{
static void Main(string[] args)
{