Skip to content

Instantly share code, notes, and snippets.

View NTICompass's full-sized avatar

Eric Siegel NTICompass

View GitHub Profile
#!/bin/env python3
"""
Brute-force solver for a math toy/puzzle
©1993 Silver Star
"""
import operator
from itertools import product
from collections import deque
@NTICompass
NTICompass / conky.conf
Last active October 17, 2019 18:17
Conky Config
-- 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 June 17, 2022 14:38
BEK File Decoder
#!/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 July 17, 2016 02:15
Gentoo Portage shortcuts script (and ZSH completion file)
#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 August 30, 2017 16:14
Mount Encrypted Drives
#!/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 October 31, 2023 16:05
Bulk-remove Mandrill sending domains
<?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 September 17, 2016 18:39
SSH magic tricks
#!/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 March 8, 2016 16:07
Soarer Converter - Model M Remap
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 January 27, 2016 22:10
Run headless wkhtmltopdf inside Docker container
# 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)

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: