Skip to content

Instantly share code, notes, and snippets.

View inoperable's full-sized avatar
💣
RTFM || GTFO

inoperable inoperable

💣
RTFM || GTFO
  • REDACTED
  • REDACTED
  • 01:37 (UTC +01:00)
View GitHub Profile
@inoperable
inoperable / hal_private_dispatch.h
Last active August 31, 2024 08:36
HAL_PRIVATE_DISPATCH struct
//0x4f0 bytes (sizeof)
struct HAL_PRIVATE_DISPATCH
{
ULONG Version; //0x0
struct _BUS_HANDLER* (*HalHandlerForBus)(enum _INTERFACE_TYPE arg1, ULONG arg2); //0x8
struct _BUS_HANDLER* (*HalHandlerForConfigSpace)(enum _BUS_DATA_TYPE arg1, ULONG arg2); //0x10
VOID (*HalLocateHiberRanges)(VOID* arg1); //0x18
LONG (*HalRegisterBusHandler)(enum _INTERFACE_TYPE arg1, enum _BUS_DATA_TYPE arg2, ULONG arg3, enum _INTERFACE_TYPE arg4, ULONG arg5, ULONG arg6, LONG (*arg7)(struct _BUS_HANDLER* arg1), struct _BUS_HANDLER** arg8); //0x20
VOID (*HalSetWakeEnable)(UCHAR arg1); //0x28
LONG (*HalSetWakeAlarm)(ULONGLONG arg1, ULONGLONG arg2); //0x30
@inoperable
inoperable / rust-command-line-utilities.markdown
Created March 8, 2024 10:39 — forked from sts10/rust-command-line-utilities.markdown
A curated list of command-line utilities written in Rust

A curated list of command-line utilities written in Rust

Note: I have moved this list to a proper repository. I'll leave this gist up, but it won't be updated. To submit an idea, open a PR on the repo.

Note that I have not tried all of these personally, and cannot and do not vouch for all of the tools listed here. In most cases, the descriptions here are copied directly from their code repos. Some may have been abandoned. Investigate before installing/using.

The ones I use regularly include: bat, dust, fd, fend, hyperfine, miniserve, ripgrep, just, cargo-audit and cargo-wipe.

  • atuin: "Magical shell history"
  • bandwhich: Terminal bandwidth utilization tool

Change the Default Terminal in i3wm

To change the default terminal, you can modify the /usr/bin/i3-sensible-terminal file:

- for terminal in "$TERMINAL" x-terminal-emulator mate-terminal gnome-terminal terminator xfce4-terminal urxvt rxvt termit Eterm aterm uxterm xterm roxterm termite lxterminal terminology st qterminal lilyterm tilix terminix konsole kitty guake tilda alacritty hyper wezterm; do
+ for terminal in "$TERMINAL" kitty alacritty x-terminal-emulator mate-terminal gnome-terminal terminator xfce4-terminal urxvt rxvt termit Eterm aterm uxterm xterm roxterm termite lxterminal terminology st qterminal lilyterm tilix terminix konsole kitty guake tilda alacritty hyper wezterm; do

    if command -v "$terminal" > /dev/null 2>&1; then
 exec "$terminal" "$@"
# Put this into your PS profile, execute from cmd.exe:
# notepad.exe %USERPROFILE%\Documents\PowerShell\Microsoft.PowerShell_profile.ps1
# notepad.exe %USERPROFILE%\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1
# Because there is never enough Telemetry ...
function Telefucktry-Optout() {
# powershell telemetry
[System.Environment]::SetEnvironmentVariable("POWERSHELL_CLI_TELEMETRY_OPTOUT","1","Machine")
[System.Environment]::SetEnvironmentVariable("POWERSHELL_CLI_TELEMETRY_OPTOUT","1","User")
[System.Environment]::SetEnvironmentVariable("POWERSHELL_TELEMETRY_OPTOUT","1","Machine")
@inoperable
inoperable / audit.rules
Created March 18, 2022 18:57 — forked from Neo23x0/audit.rules
Linux Auditd Best Practice Configuration
# IMPORTANT!
# This gist has been transformed into a github repo
# You can find the most recent version there:
# https://github.com/Neo23x0/auditd
# ___ ___ __ __
# / | __ ______/ (_) /_____/ /
# / /| |/ / / / __ / / __/ __ /
# / ___ / /_/ / /_/ / / /_/ /_/ /
# /_/ |_\__,_/\__,_/_/\__/\__,_/
@inoperable
inoperable / errno-combined.h
Created December 11, 2020 12:54
POSIX error code definition, combined from linux kernel
/*
* Shamelessly copied from: https://nuetzlich.net/errno.html
* Linux error numbers, straight from the horse's mouth.
* Kernel source: errno-base.h errno.h linux/errno.h
*
*/
#define EPERM 1 /* Operation not permitted */
#define ENOENT 2 /* No such file or directory */
#define ESRCH 3 /* No such process */
@inoperable
inoperable / use-jdk.zsh
Last active November 2, 2020 10:14
sdkman to fzf quick and dirty selection of installed JDKS with fzf in zsh (should work also in bash, i guess)
# assuming sdkman is installed in default location: $HOME/.sdkman
# grep selects only from INSTALLED candidates
#
# add to your .zshrc or .zshrc.local or save it as use-jdk.zsh and
# load it on init with 'source ~/PATH/TO/SCRIPT/use-jdk.zsh'
function use-jdk() {
FUNCS=$(functions sdk);
sdk ls java | grep installed | grep -Po "\|\s\d+.*|" | gawk '{ print $8 }' | fzf -e | xargs -I{} zsh -c "eval $FUNCS; . ~/.sdkman/bin/sdkman-init.sh; sdk default java {}"
}
@inoperable
inoperable / xmodmap apple
Last active October 15, 2020 13:58
xmodmap for apple / mode_switch ala hyper alternative for left-handed humans
! clear all level 1-5 key modifiers
clear Mod5
clear Mod4
clear Mod3
clear Mod2
clear Mod1
! clear current control key modifiers
clear Control
[[ ! -v ${MAKEFLAGS} ]] && MAKEFLAGS="--jobs=$(nproc)" || MAKEFLAGS+=" --jobs=$(nproc)"
./configure --download=all \
--debug \
--fully-static \
--gdb --with-intl=small-icu \
--v8-options="$(./node --v8-options | grep -P "harmony|future" | gawk {' print $1 '} | tr -s '\n' ' ' | xargs)"
make
# Using these pry gems
# gem "pry"
# gem "pry-rails"
# gem "pry-byebug"
# gem "pry-stack_explorer"
# gem "pry-doc"
# gem "pry-state"
# gem "pry-toys"
# gem "pry-rescue"