Skip to content

Instantly share code, notes, and snippets.

View KazWolfe's full-sized avatar


View GitHub Profile
KazWolfe / BatteryMCVE.cpp
Last active April 15, 2022 18:31
Quick-n-Dirty MCVE to test getting battery status for Windows computers using Kernel32's GetSystemPowerStatus
#include <iostream>
#include <Windows.h>
int main() {
if (!GetSystemPowerStatus(&sps)) return 1;
std::cout << "== BATTERY STATUS ==" << std::endl;
std::cout << "Battery Present : " << (sps.BatteryFlag < 100) << std::endl;
KazWolfe / openpgp.txt
Created October 2, 2018 03:55
OpenKeychain Linked Identity
This Gist confirms the Linked Identity in my OpenPGP key, and links it to this GitHub account.
Token for proof:
[Verifying my OpenPGP key: openpgp4fpr:14c529ad4bace342f2e1aa5d258813f53a16ebb4]
KazWolfe /
Last active October 24, 2017 06:01
GPG Dynamic Smartcard Script
# This script exists to solve a problem with GPG2's current smartcard system. Turns out there can only be
# one smart card (yubikey) attached to any public key at a time. This makes using your backup/spare keys
# very difficult. However, we can just automate the entire key registration procedure!
# Author: Kaz Wolfe (, 2017-10-23
# License: MIT
KazWolfe /
Created March 29, 2017 08:04
Simple echo script that does cool things.
#!/usr/bin/env python
# Echoes the URL back, replacing / with spaces.
# Based off Nathan Hamiel's Reflect script (
# By Kaz Wolfe, 2017. No rights reserved.
from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler
from optparse import OptionParser
class RequestHandler(BaseHTTPRequestHandler):
KazWolfe /
Last active January 24, 2017 00:40
Recursively list directories/files through Java
* Recursively list directories/files through Java, akin to Linux's `ls -R` command.
* (c) 2017, KazWolfe. Under MIT license.
* To use, save to `` and compile with `javac`.
* Run with `java -cp . Recurse /path/to/operate/on`. Be sure you are passing in a folder.
import java.lang.String;
KazWolfe / Pokemon GO Data Dump.txt
Last active February 28, 2022 04:27
A data dump of a lot of cool Pokemon GO facts
# Pokemon GO Data Dump (in no order)
# By Kaz Wolfe (@KazWolfe on
# Dump version 3.3, pulled from 0.29.0
# Feel free to use this dump in anything, but please link back to it!
# This ensures that people can see and use the source of the data
# (which updates regularly), and find out new things.
# Thanks Anonymous for some data:
KazWolfe /
Last active July 15, 2016 02:07
Programmer Milk
// Inspired by the joke:
// "A programmer was walking out the door for work when
// his wife said, 'While you're out, buy some milk.'
// The programmer never came home.
programmer.getToDoList().getLocationList().addItem(Location.ANYWHERE, () -> {programmer.moveTo(Location.SUPERMARKET);});
programmer.getToDoList().getLocationList().addItem(Location.SUPERMARKET, (neededAmount) -> {
// Get the price and inventory from the Economy.
double price = Economy.getStore(Store.SUPERMARKET).getInventory().getItemClass(ItemClass.MILK).getPrice();
KazWolfe / noaccess.c
Created June 29, 2016 17:03
A No Access Shell
// Compile using `gcc noaccess.c -o noaccess`
// Move to /usr/bin, and set as a shell for any deserving users
int main() {
printf("Shell access is denied. \nConnect using -N, or keep this window open to use your tunnel.\n");

Keybase proof

I hereby claim:

  • I am KazWolfe on github.
  • I am kazwolfe ( on keybase.
  • I have a public key whose fingerprint is 14C5 29AD 4BAC E342 F2E1 AA5D 2588 13F5 3A16 EBB4

To claim this, I am signing this object: