This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/fontforge | |
/* --------------- (c) 2012 Huan Truong ---------------- */ | |
/* Sexy script to strip unused glyphs from ttf file. */ | |
/* ----------------------------------------------------- */ | |
Open($argv[1]); | |
SelectNone(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
# ------------------------------------------------------------ | |
# Projector PJLink Control Script | |
# | |
# ------------------------------------------------------------ | |
# 2012 IT Services, Truman State University | |
# | |
# Maintained by Huan Truong, get the latest version at | |
# https://gist.github.com/1677547 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<config> | |
<allowed-sites> | |
<start-url>https://www.google.com</start-url> | |
<host-regex>^.*google\.com$</host-regex> | |
<host-regex>^.*slashdot.org$</host-regex> | |
<host-regex>^.*facebook.com$</host-regex> | |
</allowed-sites> | |
</config> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
## install adblock v4.5mod | |
## With jimmies' modifications | |
## encoded: cat adblock.sh | gzip -c | openssl enc -e -base64 | |
PREFIX="/tmp/mnt/sda1/adblock/" ## adjust this! | |
[ -d "$PREFIX" ] || mkdir -p "$PREFIX" | |
echo " | |
H4sIAB+rOVMAA5VXe1PbSBL/2/oUzaBCOGVZNix7WXOmjoATXEtiFkztVYXkSlhj |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
! Chromebook C720 ~/.Xmodmap | |
! Huan Truong - 2014 | |
! = <1:Key> <2:Shift+Key> <3:mode_switch+Key> <4:mode_switch+Shift+Key> <5:AltGr+Key> <6:AltGr+Shift+Key> <7:Ctrl+Alt+Key> | |
! Clear both Alt keys mapping | |
clear Mod1 | |
add mod1 = Alt_L | |
! Make the right alt key to be the mode switch key | |
keycode 108 = Mode_switch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PREFIX="/tmp/adblock/" ## adjust this! | |
mkdir $PREFIX | |
echo ' | |
PIXEL_IP="0" ## 0: disable pixelserv | |
PIXEL_OPTS="" | |
BRIDGE="br0" | |
RAMLIST="1" ## 1: keep blocklist in RAM (e.g. for small JFFS) | |
CONF="/etc/dnsmasq.custom" ## dnsmasq custom config | |
SOURCES="$SOURCES http://winhelp2002.mvps.org/hosts.txt" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// MaxProduct solution | |
// Huan Truong | |
// For those who are too lazy to think, like me | |
int maxProduct(int* nums, int numsSize) { | |
int bestSoFar = nums[0]; | |
// Max magnitute product we have in a single "segment" | |
int maxp = nums[0]; | |
// Smallest magnitute product we have | |
int minp = nums[0]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Edit this so that the default volume doesn't blow your head off | |
/usr/share/pulseaudio/alsa-mixer/paths/analog-output.conf.common | |
[Element Speaker] | |
switch = mute | |
volume = ignore | |
[Element PCM] | |
switch = mute |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vim files/etc/uci-defaults/set-wifinetwork.sh | |
#!/bin/sh | |
uci set wireless.@wifi-device[0].disabled=0 | |
uci set wireless.@wifi-iface[0].ssid="HAB.education Classroom Wireless" | |
uci set wireless.@wifi-iface[0].encryption=psk2 | |
uci set wireless.@wifi-iface[0].key="spacecadet" | |
uci commit wireless | |
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Button / SolderingIronBOff | |
Automatically turns off soldering station. | |
Turns on the power switch tail (also the LED) | |
connected to digital pin 1.6, | |
when pressing a pushbutton attached to pin 2. | |
Automatically times out when it reaches a threshold. | |
OlderNewer