Skip to content

Instantly share code, notes, and snippets.

View sjuxax's full-sized avatar

Jeff Cook sjuxax

View GitHub Profile
@hartym
hartym / git-stash-grep
Created May 3, 2012 09:45 — forked from netshade/gist:1125810
git stash grep (bash)
stashgrep() {
for i in `git stash list | awk -F ':' '{print $1}'`; do
git stash show -p $i | grep -H --label="$i" "$1"
done
}
@mikesmullin
mikesmullin / x86-assembly-notes.md
Last active July 4, 2026 17:41
Notes on x86-64 Assembly and Machine Code

Mike's x86-64 Assembly (ASM) Notes

Assembling Binary Machine Code

Operating Modes:

These determine the assumed/default size of instruction operands, and restricts which opcodes are available, and how they are used.

Modern operating systems, booted inside Real mode,

@XVilka
XVilka / TrueColour.md
Last active July 13, 2026 20:43
True Colour (16 million colours) support in various terminal applications and terminals

THIS GIST WAS MOVED TO TERMSTANDARD/COLORS REPOSITORY.

PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!

@altrive
altrive / SetAccountPrevilage.ps1
Created February 22, 2014 09:55
Sample code to set LSA account previlage via P/Invoke(LsaAddAccountRights).
#Requires -RunAsAdministrator
function Main
{
$ErrorActionPreference = "Stop"
$VerbosePreference = "Continue"
#Target account to assign previlage
$svcAccount = "TestSvc"
@joeharr4
joeharr4 / ssh-cipher-benchmark.sh
Last active April 30, 2025 02:32 — forked from dlenski/ssh-cipher-benchmark.sh
Check speed of ssh cipher(s) on your system
#!/bin/bash
# ssh-cipher-benchmark.sh - Assesses speed of SSH encryption between specific hosts.
# Usage:
# ssh-cipher-benchmark.sh <remotehost> [ciphers]
# Default ciphers: all we can find...
#
# Note: In some cases, the first cipher tested runs faster than the others, regardless of order.
# Cause of this is not known, but changing the order of testing shows it to be true. Run the
# first one twice if you suspect this. Perhaps it is due to buffering?
@erikw
erikw / znp
Last active July 4, 2026 00:59
znp: Wrap shell command in ZFS pre-post snapshots and log outputs.
#!/usr/bin/env bash
# Runs a command wrapped in ZFS pre-post snapshots. The whole data pool is recursively snapshotted.
# Analogous to my snp script for BTRFS: https://gist.github.com/erikw/5229436
# Usage: $ znp <commands>
# e.g.: $ znp pgk upgrade
# e.g.: $ znp portmaster -aG
# e.g.: $ znp freebsd-upgrade install
zfs_pool=zroot
@bbqtd
bbqtd / macos-tmux-256color.md
Last active July 13, 2026 23:39
Installing tmux-256color for macOS

Installing tmux-256color for macOS

  • macOS 10.15.5
  • tmux 3.1b

macOS has ncurses version 5.7 which does not ship the terminfo description for tmux. There're two ways that can help you to solve this problem.

The Fast Blazing Solution

Instead of tmux-256color, use screen-256color which comes with system. Place this command into ~/.tmux.conf or ~/.config/tmux/tmux.conf(for version 3.1 and later):

@ksamuel
ksamuel / download_bookmarks.py
Created December 20, 2019 12:16
A quick and dirty python script to download all firefox bookmarks as stand alone static pages
"""
usage: download_bookmarks.py [-h] [--concurrency [CONCURRENCY]] [--directory DIRECTORY] bookmarks
positional arguments:
bookmarks The path to the sqlite db file containing
the bookmarks. It's the places.sqlite file
in your default profile dir.
optional arguments:
-h, --help show this help message and exit
@richardpl
richardpl / drcbox.lua
Last active June 30, 2025 05:24
dynaudnorm filter with visual feedback
--[[
mpv dynaudnorm filter with visual feedback.
Copyright 2016 Avi Halachmi ( https://github.com/avih )
Copyright 2020 Paul B Mahol
License: public domain
Needs mpv with very recent FFmpeg build.
Default config:
@laurelmay
laurelmay / PKGBUILD
Created March 20, 2020 01:34
aws-cli-v2 PKGBUILD
pkgname=aws-cli-v2
pkgver=2.0.4
pkgrel=1
pkgdesc='Universal Command Line Interface for Amazon Web Services version 2'
arch=('i686' 'x86_64')
url='https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html'
license=('Apache')
provides=('aws-cli')
conflicts=('aws-cli')
makedepends=('python-setuptools')