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
/* | |
* TIL311 / DIS1417 tester | |
* | |
* MSB_PIN -> input D | |
* input C | |
* input B | |
* LSB_PIN -> input A | |
* | |
* also hook up LATCH_PIN and BLANKING_PIN accordingly | |
* |
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
Windows Registry Editor Version 5.00 | |
; see https://www.tekrevue.com/tip/remove-onedrive-file-explorer-sidebar-windows-10/ | |
[HKEY_CLASSES_ROOT\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}] | |
"System.IsPinnedToNameSpaceTree"=dword:00000000 |
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 | |
# | |
# sets up NAT to allow $LOCAL_IF to get to the Internet via $EXT_IF | |
# don't run this twice as it keeps appending iptables rules | |
# | |
set -e | |
LOCAL_IF=${1:-usb0} | |
EXT_IF=${2:-eth0} |
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
# | |
# Python implementation of bencoding (used in torrents) | |
# | |
# 2017.01.16 darell tan | |
# | |
import sys | |
import re | |
from collections import OrderedDict |
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/bash -e | |
modprobe libcomposite | |
cd /sys/kernel/config/usb_gadget/ | |
mkdir g && cd g | |
echo 0x1d6b > idVendor # Linux Foundation | |
echo 0x0104 > idProduct # Multifunction Composite Gadget | |
echo 0x0100 > bcdDevice # v1.0.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
#!/usr/bin/env python | |
# | |
# extracts and parse BackupKeyBag | |
# | |
# 2017.02.04 darell tan | |
# | |
from plist import * | |
import struct | |
import sys |
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
package main | |
import ( | |
"fmt" | |
"time" | |
"encoding/binary" | |
) | |
type t struct { | |
tm time.Time |
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
<!-- overlapping region visualization --> | |
<html> | |
<style> | |
div { | |
background: #00f; | |
opacity: .5; | |
position: absolute; | |
color: #fff; | |
font-family: sans-serif; | |
text-align: center; |
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
package main | |
import "fmt" | |
type state struct { | |
digit [2]int | |
negative bool | |
} | |
const MAX_NUMBER = 16 |
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
# | |
# computes/verifies the checksum for Intel HEX files | |
# | |
# 2017.07.16 darell tan | |
# | |
from binascii import unhexlify, hexlify | |
import struct | |
import sys |