Skip to content

Instantly share code, notes, and snippets.

Huan Truong htruong

Block or report user

Report or block htruong

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
htruong / intel-hd-4000-1440p-notes.txt
Created Feb 19, 2018
How to force Intel HD graphics (HD 4000 and so on) to output 1440p
View intel-hd-4000-1440p-notes.txt
I have a 1440p monitor with an old computer that has Intel HD 4000, which doesn't support outputtin to 1440p natively. I bought a high-end AMD graphics card and a high-end NVIDIA card, but they both don't work well one way or another. The damn AMD driver doesn't support audio, the NVIDIA... don't ask.
Anyway, I figured there is a way to do 1440p natively on Intel, you just have to have 55Hz. You'd have to have a Windows setup.
Follow this instruction, you should be able to get 2560x1440@55Hz on Windows
If that works, export your edid using Moninfo:
htruong /
Last active May 26, 2020
Chroot to pi sd card
# This script allows you to chroot ("work on")
# the raspbian sd card as if it's the raspberry pi
# on your Ubuntu desktop/laptop
# just much faster and more convenient
# credits:
# make sure you have issued
htruong /
Last active May 16, 2020 — forked from jkullick/
Chroot into Raspberry Pi ARMv7 Image with Qemu
# raspbian stretch lite on ubuntu

### You can write the raspbian image onto the sd card,
# boot the pi so it expands the fs, then plug back to your laptop/desktop
# and chroot to it with my script 
# sudo ./ /dev/sdb
# I found it to be much less of a pain in the ass and more reliable
# than doing the kpartx thing
View disqus_amp.html
<div id="disqus_thread"></div>
window.addEventListener('message', receiveMessage, false);
function receiveMessage(event)
if ( {
var msg;
try {
msg = JSON.parse(;
} catch (err) {
View My favorite OpenWRT build
make image PROFILE=WNDR3700 PACKAGES="base-files busybox dnsmasq dropbear firewall fstools hostapd-common ip ip6tables iptables iptables-mod-conntrack-extra iptables-mod-ipopt iw jshn jsonfilter kernel kmod-ath kmod-ath9k kmod-ath9k-common kmod-cfg80211 kmod-crypto-aes kmod-crypto-arc4 kmod-crypto-core kmod-gpio-button-hotplug kmod-ifb kmod-ip6tables kmod-ipt-conntrack kmod-ipt-conntrack-extra kmod-ipt-core kmod-ipt-ipopt kmod-ipt-nat kmod-ipv6 kmod-lib-crc-ccitt kmod-mac80211 kmod-nf-conntrack kmod-nf-conntrack6 kmod-nf-ipt kmod-nf-ipt6 kmod-nf-nat kmod-nf-nathelper kmod-ppp kmod-pppoe kmod-pppox kmod-sched kmod-sched-core kmod-slhc libblobmsg-json libc libgcc libip4tc libip6tc libiwinfo libiwinfo-lua libjson-c libjson-script liblua libnl-tiny libubox libubus libubus-lua libuci libuci-lua libxtables lua luci luci-app-firewall luci-app-sqm luci-base luci-lib-ip luci-lib-nixio luci-mod-admin-full luci-proto-ipv6 luci-proto-ppp luci-theme-bootstrap mtd netifd odhcp6c odhcpd opkg procd rpcd rssileds sqm-
View SolderingIronBOff.ino
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.
htruong / gist:368870d67dbc9097b0c6b57553506ec8
Last active Apr 10, 2016 - OpenWRT image
View gist:368870d67dbc9097b0c6b57553506ec8
vim files/etc/uci-defaults/
uci set wireless.@wifi-device[0].disabled=0
uci set wireless.@wifi-iface[0].ssid=" Classroom Wireless"
uci set wireless.@wifi-iface[0].encryption=psk2
uci set wireless.@wifi-iface[0].key="spacecadet"
uci commit wireless
exit 0
htruong / gist:61a7d4ec3f4c2f481997
Created Feb 11, 2016
Notes on setting up Chromebook 13
View gist:61a7d4ec3f4c2f481997
#Edit this so that the default volume doesn't blow your head off
[Element Speaker]
switch = mute
volume = ignore
[Element PCM]
switch = mute
View maxProduct.c
// 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];
htruong / WAN-UP
Created May 16, 2014
Tomato Adblock LITE script
PREFIX="/tmp/adblock/" ## adjust this!
mkdir $PREFIX
echo '
PIXEL_IP="0" ## 0: disable pixelserv
RAMLIST="1" ## 1: keep blocklist in RAM (e.g. for small JFFS)
CONF="/etc/dnsmasq.custom" ## dnsmasq custom config
You can’t perform that action at this time.