Skip to content

Instantly share code, notes, and snippets.

View bryceml's full-sized avatar

Bryce Larson bryceml

View GitHub Profile
@bryceml
bryceml / ipv6
Created February 15, 2016 23:51
dd-wrt(svn revision: 26653 on tp-link wdr3600) 6rd with firewall startup script for centurylink (qwest) in utah at least
#!/bin/sh
WANIP=$(ifconfig ppp0 |grep 'inet addr:'|cut -d: -f2|cut -d' ' -f1)
if [ -n "$WANIP" ]
then
insmod /lib/modules/`uname -r`/ipv6.ko
insmod /lib/modules/`uname -r`/tunnel4.ko
insmod /lib/modules/`uname -r`/ip_tunnel.ko
insmod /lib/modules/`uname -r`/sit.ko
@bryceml
bryceml / Google Email Code
Created March 14, 2016 02:57
Auto Delete, Archive, and Fowrard Gmail with Google Scripts
//To install go to https://www.google.com/script/start/ and setup the triggers
function cleanUp() {
var delayDays = 7 // Enter # of days before messages are moved to trash
var maxDate = new Date();
maxDate.setDate(maxDate.getDate()-delayDays);
var label = GmailApp.getUserLabelByName("delete me after 7 days");
var threads = label.getThreads();
for (var i = 0; i < threads.length; i++) {
@bryceml
bryceml / ipv6-rerunable
Last active March 16, 2016 06:09
dd-wrt(svn revision: 26653 on tp-link wdr3600) 6rd with firewall startup script for centurylink (qwest) in utah at least
#!/bin/sh
if [ -e /tmp/bryce-ipv6.lock ]
then
exit 0
fi
touch /tmp/bryce-ipv6.lock
WANIP=$(ifconfig ppp0 |grep 'inet addr:'|cut -d: -f2|cut -d' ' -f1)
if [ -n "$WANIP" ]
@bryceml
bryceml / .Xmodmap
Created April 30, 2016 17:35
Make Caps-Lock escape
clear Lock
keysym Caps_Lock = Escape
@bryceml
bryceml / 51-synaptics.conf
Created April 30, 2016 17:37
Middle Click Trackpad /etc/X11/xorg.conf.d/51-synaptics.conf
# Example xorg.conf.d snippet that assigns the touchpad driver
# to all touchpads. See xorg.conf.d(5) for more information on
# InputClass.
# DO NOT EDIT THIS FILE, your distribution will likely overwrite
# it when updating. Copy (and rename) this file into
# /etc/X11/xorg.conf.d first.
# Additional options may be added in the form of
# Option "OptionName" "value"
#
Section "InputClass"
@bryceml
bryceml / fix-steam.sh
Created April 30, 2016 17:38
Steam Fix for ubuntu 16.04 64 bit
#!/bin/bash
rm ~/.steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu/libstdc++.so.6
rm ~/.steam/ubuntu12_32/steam-runtime/i386/lib/i386-linux-gnu/libgcc_s.so.1
rm ~/.steam/ubuntu12_32/steam-runtime/amd64/lib/x86_64-linux-gnu/libgcc_s.so.1
rm ~/.steam/ubuntu12_32/steam-runtime/amd64/usr/lib/x86_64-linux-gnu/libstdc++.so.6
rm ~/.steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu/libxcb.so.1
@bryceml
bryceml / Portal 2.sh
Last active April 30, 2016 18:42
Fix Portal 2
#!/bin/bash
LD_PRELOAD='/usr/$LIB/libstdc++.so.6' DISPLAY=:0 steam
# From http://askubuntu.com/questions/654566/steam-doesnt-start-libgl-error
@bryceml
bryceml / ubuntu-server.seed
Last active February 25, 2019 22:01
Lubuntu Preseed for Linux Club Project
# Mostly based on the Ubuntu installation guide
# https://help.ubuntu.com/12.04/installation-guide/
d-i debconf/priority string critical
# Preseeding only locale sets language, country and locale.
d-i debian-installer/language string en
d-i debian-installer/country string US
d-i debian-installer/locale string en_US.UTF-8
@bryceml
bryceml / setup.sh
Last active February 20, 2018 17:12
Lubuntu Preseed late_command for Linux Club Project
mkdir -p /home/user/Desktop
ln -s /var/www/html /home/user/Desktop/public_html
chown 1000:1000 -R /var/www/html
chown 1000:1000 -R /home/user
ln -s nodejs /usr/bin/node
sed -i -e 's/%sudo.*$/%sudo ALL=(ALL:ALL) NOPASSWD:ALL/' /etc/sudoers
dpkg -i /root/atom-i386.deb
@bryceml
bryceml / convert
Created May 16, 2016 04:30
Change m4a audio volume
ffmpeg-normalize *.m4a -l -15 -f
ffmpeg -i normalized-*.wav -c:a aac -strict -2 -b:a 96k out.m4a