Skip to content

Instantly share code, notes, and snippets.

@aaaddress1
aaaddress1 / ExeMask.py
Last active May 4, 2024 21:38
Strip your personal compile info from Exe Files
import pefile, struct, sys
if len(sys.argv) != 2:
print(f"Strip your personal compile info from Exe Files by aaaddress1@chroot.org")
print(f"Usage: {sys.argv[0]} [path/to/exe]")
sys.exit(-1)
# Rewrite from pefile: https://github.com/erocarrera/pefile/blob/593d094e35198dad92aaf040bef17eb800c8a373/pefile.py#L3402
def mask_myRichHdr(in_pefile):
DANS = 0x536E6144 # 'DanS' as dword
@moyix
moyix / killbutmakeitlooklikeanaccident.sh
Created February 5, 2022 22:51
Script to inject an exit(0) syscall into a running process. NB: only x86_64 for now!
#!/bin/bash
gdb -p "$1" -batch -ex 'set {short}$rip = 0x050f' -ex 'set $rax=231' -ex 'set $rdi=0' -ex 'cont'
CHORDS_BASE = [:C2, :C2, :C2, :C2, :F2, :F2, :C2, :C2, :G2, :F2, :C2, :C2]
CHORDS_HARMONY = [:C3, :C3, :C3, :C3, :F3, :F3, :C3, :C3, :G3, :F3, :C3, :C3]
BLUES_SCALE = [:C4, :Eb4, :F4, :Gb4, :G, :Bb4, :C5]
FOURTH = 0.5
EIGHTH = FOURTH / 2
SIXTEENTH = EIGHTH / 2
def generate_rhythms(candidates=[EIGHTH, FOURTH], remaining_time=FOURTH*4)
rhythms = []
@slykar
slykar / dell-idrac6-ipmitool-fan-controll.md
Last active March 14, 2024 02:44
Fan control IPMI commands for Dell T610

Dell Fan Control Commands

print temps and fans rpms

ipmitool -I lanplus -H <iDRAC-IP> -U <iDRAC-USER> -P <iDRAC-PASSWORD> sensor reading "Ambient Temp" "FAN 1 RPM" "FAN 2 RPM" "FAN 3 RPM"

print fan info

@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
@AfroThundr3007730
AfroThundr3007730 / socks-create.sh
Created June 23, 2019 17:48
Create an on-demand SSH-based SOCKS5 proxy via systemd socket activation
#!/bin/bash
# These steps will allow the setup of an on-demand SSH proxy
# Three unit files will be created to serve this purpose:
# ssh-socks-helper.socket - The listening socket providing activation
# ssh-socks-helper.service - A systemd proxy to pass the socket fd
# ssh-socks.service - The actual SSH service providing the tunnel
cat <<'EOF' > ~/.config/systemd/user/ssh-socks-helper.socket
[Unit]
Description=Proxy Helper Socket for Bastion SOCKS5 Proxy
@forivall
forivall / y-combinator.ts
Last active March 27, 2024 03:38
Typescript Y-Combinator
// my brain decided to ask the question: yknow, i want you to think about the y combinator --
// like, what is it. like what the fuck girl, cmon, you have a comp sci degree, you should know this, and understand it and shit
// and so i was like fiiiiiiiiiiiiiiine gosh, lets see if typescript can handle the typing, and play around with it
// so i looked up a javascript implementation, and played with the type defintion until it
// matched up and then i was like oh: thats what the type definition of the functions in it are.
// i get it now. that's pretty cool. the main interesting thing is a the inner function that takes itself
// and returns the function initially passed to the outer function. neato.
@ClassicOldSong
ClassicOldSong / MouseDelta.ahk
Last active January 26, 2024 07:35
AHK for enhancing GPD Pocket. Run pocket_enhancement.ahk. Feature: Esc + Mouse movenent = ScrollWheel, CapsLock + PrtScn = Region Screen Capture
; Instantiate this class and pass it a func name or a Function Object
; The specified function will be called with the delta move for the X and Y axes
; Normally, there is no windows message "mouse stopped", so one is simulated.
; After 10ms of no mouse movement, the callback is called with 0 for X and Y
Class MouseDelta {
State := 0
__New(callback){
;~ this.TimeoutFn := this.TimeoutFunc.Bind(this)
this.MouseMovedFn := this.MouseMoved.Bind(this)
@meain
meain / loading_messages.js
Last active April 27, 2024 09:54
Funny loading messages
export default [
"Reticulating splines...",
"Generating witty dialog...",
"Swapping time and space...",
"Spinning violently around the y-axis...",
"Tokenizing real life...",
"Bending the spoon...",
"Filtering morale...",
"Don't think of purple hippos...",
"We need a new fuse...",
@ceejbot
ceejbot / esm_in_node_proposal.md
Last active July 17, 2023 02:45
npm's proposal for supporting ES modules in node

ESM modules in node: npm edition

The proposal you’re about to read is not just a proposal. We have a working implementation of almost everything we discussed here. We encourage you to checkout and build our branch: our fork, with the relevant branch selected. Building and using the implementation will give you a better understanding of what using it as a developer is like.

Our implementation ended up differing from the proposal on some minor points. As our last action item before making a PR, we’re writing documentation on what we did. While I loathe pointing to tests in lieu of documentation, they will be helpful until we complete writing docs: the unit tests.

This repo also contains a bundled version of npm that has a new command, asset. You can read the documentation for and goals of that comma