Skip to content

Instantly share code, notes, and snippets.

View trinitronx's full-sized avatar
⛩️
Zazen

James Cuzella trinitronx

⛩️
Zazen
View GitHub Profile
@trinitronx
trinitronx / 00-dmesg-xfs_mount_failure.log
Last active April 9, 2024 18:55
XFSv4 corrupted after kernel 6.7.11-3-MANJARO, xfsprogs 6.6.0-1
Mar 31 10:08:38 saturn kernel: XFS (md0): Mounting V4 Filesystem 29af87eb-2c60-4383-8596-079de2033a48
Mar 31 10:08:39 saturn kernel: XFS (md0): Metadata corruption detected at xfs_inobt_verify+0x91/0xb0 [xfs], xfs_inobt block 0xd78
Mar 31 10:08:39 saturn kernel: XFS (md0): Unmount and run xfs_repair
Mar 31 10:08:39 saturn kernel: XFS (md0): First 128 bytes of corrupted metadata buffer:
Mar 31 10:08:39 saturn kernel: 00000000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
Mar 31 10:08:39 saturn kernel: 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
Mar 31 10:08:39 saturn kernel: 00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
Mar 31 10:08:39 saturn kernel: 00000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
Mar 31 10:08:39 saturn kernel: 00000040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
Mar 31 10:08:39 saturn kernel: 00000050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 .........
@trinitronx
trinitronx / xcode-cli-tools.sh
Last active January 18, 2024 05:20
Script to download & install XCode Command Line tools on OSX 10.7 or 10.8. Lifted from jedi4ever/veewee template.
#!/bin/sh
# 2021-12-09:
# This script is no longer supported!
# Apple broke all direct downloads without logging with an Apple ID first.
# The number of hoops that a script would need to jump through to login,
# store cookies, and download is prohibitive.
# Now we all must manually download and mirror the files for this to work at all :'-(
OSX_VERS=$(sw_vers -productVersion | awk -F "." '{print $2}')
@trinitronx
trinitronx / Output of: yay -Syu projectm-sdl2-git
Last active December 8, 2023 07:12
projectm-sdl2-git CMake Poco build error on Archlinux & Manjaro
==> Making package: projectm-sdl2-git 62.ab46c53-1 (Thu 07 Dec 2023 11:43:01 PM MST)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
-> Updating frontend-sdl2 git repo...
==> Validating source files with sha256sums...
frontend-sdl2 ... Skipped
==> Removing existing $srcdir/ directory...
==> Extracting sources...
-> Creating working copy of frontend-sdl2 git repo...
@trinitronx
trinitronx / .gitconfig
Last active October 18, 2023 23:58
My version of git-fzf: gls (plus helpful aliases & snippets from my .gitconfig)
[color]
branch = auto
diff = auto
interactive = auto
status = auto
ui = auto
[core]
pager = less -FXRS -x2
[alias]
st = status
@trinitronx
trinitronx / git-fzf.zsh
Created October 18, 2023 23:50
My version of git-fzf: gls
# Source: https://gist.github.com/junegunn/f4fca918e937e6bf5bad?permalink_comment_id=3356674#gistcomment-3356674
alias glNoGraph='git log --color=always --format="%C(auto)%h%d %s %C(brightblack)%C(bold)%cr% C(auto)%an %G?" "$@"'
_gitLogLineToHash="echo {} | grep -o '[a-f0-9]\{7\}' | head -1"
_viewGitLogLine="$_gitLogLineToHash | xargs -I % sh -c 'git show --color=always --show-signature % | delta'"
_viewGitLogLineUnfancy="$_gitLogLineToHash | xargs -I % sh -c 'git show %'"
# ANSI Colors
c_reset='\033[0m'
c_black='\033[0;30m'
@trinitronx
trinitronx / Install_XCode.applescript
Created August 15, 2013 00:03
Script to automate XCode installation. Tested on OSX 10.8.4 Mountain Lion. I feel like using the UI element hierarchy is quite disgusting, but it works for now...
-- Function to select a menu item
-- We will use this to trigger the search box for the App Store
on do_menu(app_name, menu_name, menu_item)
try
-- bring the target application to the front
tell application app_name
activate
end tell
tell application "System Events"
tell process app_name
@trinitronx
trinitronx / truecrypt_fix.bash
Last active April 27, 2023 15:45 — forked from jimjh/truecrypt_fix.bash
Fixes annoying brew doctor messages caused by Truecrypt
#!/bin/bash
libs=( "/usr/local/lib/libmacfuse_i32.2.dylib" \
"/usr/local/lib/libosxfuse_i32.2.dylib" \
"/usr/local/lib/libosxfuse_i64.2.dylib" \
"/usr/local/lib/libmacfuse_i64.2.dylib" \
"/usr/local/lib/libosxfuse_i32.la" \
"/usr/local/lib/libosxfuse_i64.la" \
"/usr/local/lib/pkgconfig/osxfuse.pc" )
@trinitronx
trinitronx / start_x11vnc.sh
Last active December 11, 2022 13:33
A script to start x11vnc server and retry with magic cookie if a desktop session is not created. This allows one to SSH into a box with only a gdm or login screen but no existing desktop session and start x11vnc to login the first time.
#!/bin/bash
DEFAULT_DISPLAY=:0
X11VNC_DISPLAY="$DEFAULT_DISPLAY"
if [ -x /usr/bin/x11vnc ]; then
[ "$1" == '-nocache' ] && CACHE_FLAG='-noncache' || CACHE_FLAG='-noncache'
[ "$2" == '-guess' ] && GUESS_FLAG='-auth guess' || GUESS_FLAG=''
[ -f /root/.vnc/passwd ] && PASSWORD="/root/.vnc/passwd"
[ -f $HOME/.vnc/passwd ] && PASSWORD="$HOME/.vnc/passwd"
[ ! -z "$PASSWORD" ] && x11vnc -display $X11VNC_DISPLAY -xkb -rfbauth $PASSWORD -rfbport 5900 -shared -forever -nowf -norc -notruecolor -bg $GUESS_FLAG $CACHE_FLAG -noxdamage
@trinitronx
trinitronx / set_git_email_vars.sh
Last active March 8, 2022 14:48
Function to set git author & committer email addresses based on your cwd
# Original Gist: https://gist.github.com/trinitronx/5979265
# RP Gist: https://gist.github.com/returnpathadmin/dbffee1d3d675f271435
# Function to set git author & committer email addresses based on your cwd
# Uses the very first .gitemail file found while traversing up directories
# Use case: As a developer,
# Given that I have a .gitemail file in my work directory containing my work email
# When I am in the work directory
# Then I should be able to commit with my work email address
# Given that I have a .gitemail file in my public directory containing my public email
# When I am in the public directory
@trinitronx
trinitronx / README.md
Last active March 3, 2022 07:29
A shell script to install latest Ansible via pip + dependencies

omnibus-ansible

This script has moved to: neillturner/omnibus-ansible

This is the original version of the Ansible install script. If you want the latest, please see the above link!

Install latest Ansible via pip + dependencies via a shell script

This file is used to install ansible in test kitchen when you set in the kitchen.yaml file