Skip to content

Instantly share code, notes, and snippets.

View richinseattle's full-sized avatar

richinseattle

View GitHub Profile
@richinseattle
richinseattle / gist:815106f878a64adde45fcf4183e4cc8c
Created July 22, 2024 06:40 — forked from shinyquagsire23/gist:ab6f7c0f9b6514b6b54d69b9a57646be
Enabling USB device mode on Intel devices (Tweet archive)
https://twitter.com/ShinyQuagsire/status/1536432635643211777 12:37 PM · Jun 13, 2022
-----
I figured out how to enable USB device mode on my XPS 13 (9350) 🎉
Though for some ungodly reason, it uses the right-side full USB port. So a crossover cable is required.
-----
https://twitter.com/ShinyQuagsire/status/1536434057671716864 12:43 PM · Jun 13, 2022
-----
@richinseattle
richinseattle / llama-3-70B-qlora.yaml
Created June 1, 2024 11:13 — forked from mtisz/llama-3-70B-qlora.yaml
Axolotl Config for Llama-3-70B QLoRA
base_model: meta-llama/Meta-Llama-3-70B
model_type: LlamaForCausalLM
tokenizer_type: AutoTokenizer
load_in_8bit: false
load_in_4bit: true
strict: false
datasets:
- path: /home/migel/ai_datasets/tess-v1.5b-chatml.jsonl
rem USE AT OWN RISK AS IS WITHOUT WARRANTY OF ANY KIND !!!!!
rem https://technet.microsoft.com/en-us/itpro/powershell/windows/defender/set-mppreference
rem To also disable Windows Defender Security Center include this
rem reg add "HKLM\System\CurrentControlSet\Services\SecurityHealthService" /v "Start" /t REG_DWORD /d "4" /f
rem 1 - Disable Real-time protection
reg delete "HKLM\Software\Policies\Microsoft\Windows Defender" /f
reg add "HKLM\Software\Policies\Microsoft\Windows Defender" /v "DisableAntiSpyware" /t REG_DWORD /d "1" /f
reg add "HKLM\Software\Policies\Microsoft\Windows Defender" /v "DisableAntiVirus" /t REG_DWORD /d "1" /f
reg add "HKLM\Software\Policies\Microsoft\Windows Defender\MpEngine" /v "MpEnablePus" /t REG_DWORD /d "0" /f
reg add "HKLM\Software\Policies\Microsoft\Windows Defender\Real-Time Protection" /v "DisableBehaviorMonitoring" /t REG_DWORD /d "1" /f
@richinseattle
richinseattle / hint_calls.py
Created May 18, 2024 03:47 — forked from Dump-GUY/hint_calls.py
Modified version of Willi Ballenthin IDA Plugin hint_calls.py ported to support Python2/3 and IDA>=7.4 (tested IDA 7.7, 8.4)
'''
IDA plugin to display the calls and strings referenced by a function as hints.
Installation: put this file in your %IDADIR%/plugins/ directory.
Author: Willi Ballenthin <william.ballenthin@fireeye.com>
Licence: Apache 2.0
'''
import idc
import idaapi
import idautils
@richinseattle
richinseattle / memdjpeg.c
Created October 5, 2023 06:35 — forked from PhirePhly/memdjpeg.c
A bare-bones example of how to use jpeglib to decompress a jpg in memory.
// memdjpeg - A super simple example of how to decode a jpeg in memory
// Kenneth Finnegan, 2012
// blog.thelifeofkenneth.com
//
// After installing jpeglib, compile with:
// cc memdjpeg.c -ljpeg -o memdjpeg
//
// Run with:
// ./memdjpeg filename.jpg
//
@richinseattle
richinseattle / cuda_11.3_installation_on_Ubuntu_20.04
Created April 13, 2023 03:48 — forked from Mahedi-61/cuda_11.8_installation_on_Ubuntu_22.04
Instructions for CUDA v11.3 and cuDNN 8.2 installation on Ubuntu 20.04 for PyTorch 1.11
#!/bin/bash
### steps ####
# verify the system has a cuda-capable gpu
# download and install the nvidia cuda toolkit and cudnn
# setup environmental variables
# verify the installation
###
### to verify your gpu is cuda enable check
@richinseattle
richinseattle / ubuntu20-hyperv-enhanced-session.md
Created January 31, 2023 07:45 — forked from milnak/ubuntu20-hyperv-enhanced-session.md
[Enabling enhanced session in Hyper-V for Ubuntu 20] This works for me, although it seems that Hyper-V quick create now supports enhanced session by default. #ubuntu #hyperv

Setup Hyper-V enhanced session for Ubuntu 20

I couldn't find instructions that were 100% complete, so I put this together.

These instructions worked fine for me. Follow each step carefully.

Download Ubuntu 20 desktop

DO NOT create the VM by choosing Quick Create in Hyper-V Manager. Follow these instructions exactly.

@richinseattle
richinseattle / fork.c
Created January 15, 2023 10:05 — forked from petrsmid/fork.c
fork() for Windows with fixed Console
/*
* fork.c
* Experimental fork() on Windows. Requires NT 6 subsystem or
* newer.
*
* Improved version with fixed Console
*
* Copyright (c) 2023 Petr Smid
* Copyright (c) 2012 William Pitcock <nenolod@dereferenced.org>
*
@richinseattle
richinseattle / do_hypercall.c
Created September 30, 2021 08:50 — forked from abenbachir/do_hypercall.c
Emitting hypercall in c
#define do_hypercall(nr, p1, p2, p3, p4) \
__asm__ __volatile__(".byte 0x0F,0x01,0xC1\n"::"a"(nr), \
"b"(p1), \
"c"(p2), \
"d"(p3), \
"S"(p4))
void main()
{
@richinseattle
richinseattle / apatching_for_AFL_Persistent_fuzzing.diff
Created January 4, 2020 08:03 — forked from n30m1nd/apatching_for_AFL_Persistent_fuzzing.diff
Patch for Apache httpd to make it fuzzable through afl-clang-fast
Index: server/main.c
===================================================================
--- server/main.c (revision 1794475)
+++ server/main.c (working copy)
@@ -434,11 +434,157 @@
ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
" -X : debug mode (only one worker, do not detach)");
- destroy_and_exit_process(process, 1);
+ destroy_and_exit_process(process, 0);