Skip to content

Instantly share code, notes, and snippets.

Avatar

Eric Siegel (Rocket Hazmat) NTICompass

View GitHub Profile
@NTICompass
NTICompass / conky.conf
Last active Oct 17, 2019
Conky Config
View conky.conf
-- https://forum.manjaro.org/t/conky-thread-show-your-work/2951/326
conky.config = {
use_xft = true,
xftalpha = 0.8,
update_interval = 1.0,
total_run_times = 0,
own_window = true,
own_window_transparent = true,
own_window_argb_visual = true,
own_window_type = 'normal',
@NTICompass
NTICompass / bek_file.py
Last active May 28, 2020
BEK File Decoder
View bek_file.py
#!/bin/env python3
"""
PyLocker: A python program to do stuff with BitLocker drives & files.
bek_file.py: Prints info about BEK files (startup keys)
"""
import struct, binascii
# filestimes.py from http://reliablybroken.com/b/2009/09/working-with-active-directory-filetime-values-in-python/
from filetimes import filetime_to_dt
@NTICompass
NTICompass / _emergeTools
Created Jul 17, 2016
Gentoo Portage shortcuts script (and ZSH completion file)
View _emergeTools
#compdef emergeTools
# This is a zsh autocomplete file for NTICompass' "emergeTools" script
_emergeTools(){
local -a commands
commands=(
'update: Update emerge''s database'
'upgrade: List available package updates'
'safe-upgrade: Run upgrade WITHOUT --keep-going'
'check: [deprecated] Run revdep-rebuild'
@NTICompass
NTICompass / flashMount
Last active Aug 30, 2017
Mount Encrypted Drives
View flashMount
#!/bin/sh
# This script uses dislocker-fuse to mount bitlocker'd flash drives
# First off, we need to know the drive to mount.
# For now, it'll need to be passed. Maybe in the future, we can use dislocker-find or something.
# Anyway, we need to get its recovery key, so we can check to see if we have it saved.
KEYS=$(sudo dislocker-metadata -V $1 | grep 'Recovery Key GUID' | grep -Eo "'.+'")
# http://stackoverflow.com/a/15400047
KEYARRAY=(${KEYS// / })
@NTICompass
NTICompass / mandrillDomains.php
Last active Apr 1, 2020
Bulk-remove Mandrill sending domains
View mandrillDomains.php
<?php
// Quick and dirty script to remove spam domains from our mandrill account
define('API_KEY', '');
// Their API doesn't offer a "delete" method, so I'm using their website
define('USERNAME', '');
define('PASSWORD', '');
echo 'Downloading domain list...';
// Step 1, get all "sending domains" via their API
$jsonKey = json_encode(['key' => API_KEY]);
@NTICompass
NTICompass / tron.sh
Last active Sep 17, 2016
SSH magic tricks
View tron.sh
#!/bin/bash
# Should we connect via IPv4 or IPv6?
if ping -c 1 ipv6.google.com &> /dev/null
then
SERVER="tron6"
else
SERVER="tron"
fi
@NTICompass
NTICompass / ModelM.sc
Last active Mar 8, 2016
Soarer Converter - Model M Remap
View ModelM.sc
ifset set3
# Model M 1394100
remapblock
# Fix the symbol keys
#LEFT_BRACE UNASSIGNED # cents key
# I want to macro the cents key, so I need an unused keycode
LEFT_BRACE AUX1
RIGHT_BRACE BACKSLASH # | \ key
EUROPE_1 RIGHT_BRACE # > < key
@NTICompass
NTICompass / Dockerfile
Created Jan 27, 2016
Run headless wkhtmltopdf inside Docker container
View Dockerfile
# wkhtmltopdf from: http://wkhtmltopdf.org/downloads.html
FROM centos:7
MAINTAINER Eric Siegel <nticompass@gmail.com>
# Upgrade packages & repo
RUN yum -y update
# wkhtmltopdf's dependencies
RUN yum -y install zlib fontconfig freetype libX11 libXext libXrender
# Download x64 static build of wkhtmltox (with patched QT)
View keybase.md

Keybase proof

I hereby claim:

  • I am nticompass on github.
  • I am nticompass (https://keybase.io/nticompass) on keybase.
  • I have a public key whose fingerprint is 18B6 B28A F7E4 CC3D 5D21 0CE5 B8AD DB98 7263 85E8

To claim this, I am signing this object:

View .tmux.conf
set -g prefix C-a
unbind %
unbind '"'
bind | split-window -h
bind - split-window -v