Skip to content

Instantly share code, notes, and snippets.

View shabbyrobe's full-sized avatar
🐦
Movin' to sourcehut

Blake Williams shabbyrobe

🐦
Movin' to sourcehut
View GitHub Profile
@IntergalacticApps
IntergalacticApps / make_windows10_great_again.bat
Last active September 7, 2025 17:39
Make Windows 10 Great Again - stop Windows 10 spying!
@echo off
setlocal EnableDelayedExpansion
ver | find "10." > nul
if errorlevel 1 (
echo Your Windows version is not Windows 10... yet. Brace yourself, Windows 10 is coming^^!
pause
exit
)
@colebrooke
colebrooke / audit.sh
Created April 8, 2016 16:19
Setting up auditd on Ubuntu 14.04 to monitor both tty and root commands
#!/bin/bash
# Justin Miller 08/04/16
# Setup auditd
# command example:
# aureport --tty
#
# to view root commands:
# ausearch -ue 0
# to view user commands:
# ausearch -ua <userid>
@alirobe
alirobe / reclaimWindows10.ps1
Last active September 27, 2025 02:50
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of https://github.com/Disassembler0/Win10-Initial-Setup-Script (different defaults). N.…
###
###
### UPDATE: For Win 11, I recommend using this tool in place of this script:
### https://christitus.com/windows-tool/
### https://github.com/ChrisTitusTech/winutil
### https://www.youtube.com/watch?v=6UQZ5oQg8XA
### iwr -useb https://christitus.com/win | iex
###
### OR take a look at
### https://github.com/HotCakeX/Harden-Windows-Security
@mholt
mholt / transcript
Created February 26, 2016 18:42
Is it necessary to consume response body before closing it (net/http client code)?
mholt [9:10 AM]
When using http.Get(), is it really necessary to read the full response body just to close it later?
[9:10]
The docs keep saying `Caller should close resp.Body when done reading from it.` and I keep seeing code like this:
```
io.Copy(ioutil.Discard, resp.Body)
resp.Body.Close()
```
@ousttrue
ousttrue / FFMpegYUV4Texture.cs
Last active September 20, 2024 02:44
TextureUpdater for Unity by ffmpeg
using UnityEngine;
using System.IO;
using System;
using System.Linq;
using System.Text;
using System.Collections.Generic;
using System.Collections;
public class FFMpegYUV4Texture : MonoBehaviour
{
@mmozeiko
mmozeiko / incbin.c
Last active June 26, 2025 15:22
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
@leodutra
leodutra / bitwise-hacks.js
Last active September 21, 2025 01:23
Fast Int Math + Bitwise Hacks For JavaScript
/**
* Bitwise Mathematics Utilities
*
* A collection of fast bitwise operations for integer mathematics.
* These functions prioritize performance over readability and should be used
* when micro-optimizations are critical (game engines, real-time applications).
*
* References:
* - http://michalbe.blogspot.com.br/2013/03/javascript-less-known-parts-bitwise.html
* - http://jsperf.com/bitwise-vs-math-object
@quark-zju
quark-zju / gdb-trace.py
Last active June 11, 2025 01:50
Trace all function calls using gdb
#!/usr/bin/env python
try:
import gdb
inside_gdb = True
except ImportError:
inside_gdb = False
if inside_gdb:
---
- hosts: localhost
vars:
- kb_key: "com.apple.keyboard.modifiermapping"
- kb_map_dest: "HIDKeyboardModifierMappingDst"
- kb_map_src: "HIDKeyboardModifierMappingSrc"
tasks:
- shell: >
ioreg -p IOUSB -c IOUSBDevice |
grep -e class -e idVendor -e idProduct |
---
- hosts: localhost
vars:
- kb_key: "com.apple.keyboard.modifiermapping"
- kb_map_dest: "HIDKeyboardModifierMappingDst"
- kb_map_src: "HIDKeyboardModifierMappingSrc"
tasks:
- shell: >
ioreg -p IOUSB -c IOUSBDevice |
grep -e class -e idVendor -e idProduct |