Skip to content

Instantly share code, notes, and snippets.

View cpgillem's full-sized avatar

Cade Gillem cpgillem

View GitHub Profile
@cpgillem
cpgillem / mc.ahk
Created June 13, 2020 02:06
Autohotkey script for various Minecraft tasks
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
toggle_click=0
toggle_concrete=0
; CREDIT
; https://autohotkey.com/board/topic/111640-send-left-mouse-click-once-per-second/
@cpgillem
cpgillem / mc.ahk
Created June 13, 2020 02:06
Autohotkey script for various Minecraft tasks
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
toggle_click=0
toggle_concrete=0
; CREDIT
; https://autohotkey.com/board/topic/111640-send-left-mouse-click-once-per-second/
@cpgillem
cpgillem / imperial_ft_in
Created February 8, 2018 17:06
Cursed regex for identifying the parts of imperial unit strings that match the format [x' y"] or [y"]
^(?:(?<fq>-?\d+)\s*(?<fu>\'|f(?:ee)?t\.?))?\s*(?<iq>(?:\d+\s+)?\d+\/\d+|\d*\.\d+|\d+)\s*(?<iu>\"|''|in(?:ches|\.?))$
@cpgillem
cpgillem / Octree Illustration
Last active December 26, 2016 01:56
Illustration of how I would conceptualize an array-backed octree data structure, complete with ASCII art.
/*
0 = 000: x-, y-, z-
1 = 001: x-, y-, z+
2 = 010: x-, y+, z-
3 = 011: x-, y+, z+
4 = 100: x+, y-, z-
5 = 101: x+, y-, z+
6 = 110: x+, y+, z-
7 = 111: x+, y+, z+
@cpgillem
cpgillem / i3config
Created October 16, 2016 16:15
i3 Config 2016-Oct-16
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
@cpgillem
cpgillem / bootstrap.sh
Last active August 29, 2015 14:24
Basic bootstrap shell script for Vagrant. Installs the LAMP stack and sets the MySQL password to "twentyseven" (A password I tend to use for such things).
#!/bin/bash
# from https://www.howtoforge.com/tutorial/vagrant-ubuntu-linux-apache-mysql-php-lamp/
# Update Repo
sudo apt-get -y update
# Install Apache
sudo apt-get -y install apache2
# Install MySQL
@cpgillem
cpgillem / publisher.py
Created April 13, 2015 04:18
Module for HTML/CSS/Markdown/PDF publication.
#!/usr/bin/python
'''
Computer Club of WMU Markdown Publishing System
by cpg
This is a module that can be used to process any computer club documentation
from markdown to one of the following formats:
- HTML with simple, built-in CSS
- Plain HTML
@cpgillem
cpgillem / .vimrc
Last active September 20, 2015 17:31
My Vimrc for all my Unix OSs
" Basic Settings
set shell=bash
filetype plugin indent off
" Plugins Through VimPlug
call plug#begin('~/.vim/plugged')
Plug 'scrooloose/nerdtree'
@cpgillem
cpgillem / .bashrc-synced
Last active August 29, 2015 14:18
My bashrc for Unix OSs
# SSH Convenience Aliases
alias cclub="ssh cpgsquared@yakko.cs.wmich.edu -t 'tmux attach -d'"
alias home="ssh cpg@leona.cadegillem.me"
alias home-admin="ssh sysadmin@leona.cadegillem.me"
alias testvm="ssh -p 2222 localhost"
alias flayground="ssh cpg@104.131.162.180"
# Program aliases
alias subl="/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl"
alias l="ls -la"
@cpgillem
cpgillem / plan_database.sql
Created April 3, 2015 05:05
PLAN Website SQL Database setup draft.
CREATE TABLE participants (
first_name varchar(100) NOT NULL,
last_name varchar(200) NOT NULL,
email varchar(200) NOT NULL,
nick varchar(50) NOT NULL, # PLAN nick to use as a primary key. For cclub members, this should be their cclub nick
ccawmu_user varchar(50), # If the participant is a cclub member, their ldap name goes here.
terms boolean NOT NULL,
PRIMARY KEY (email)
);