Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
# A simple webpage snapshot tool
# Try to get a free proxy, and then wget a webpage via the proxy
for ((;;))
do
wget https://free-proxy-list.net/anonymous-proxy.html -O proxy.html
proxy=$(grep '<td>[0-9\.]\+</td>' proxy.html | sed -e 's,.*<td>\([0-9\.]*\)</td><td>\([0-9]\+\)</td>.*,\1:\2,' | head -n 1)
@tklam
tklam / Raspberry Pi Zero W as a body cam
Created September 22, 2019 15:00
Raspberry Pi Zero W as a body cam
# Readme for developers
## Hardware
+ Raspberry Pi Zero W
+ Pi Camera NOIR V2 (use regular Pi Camera if false colour is unacceptable or
night vision is not required)
## Software
+ OS: Kali linux for ARM
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <iostream>
using namespace std;
enum MonthDay {
JANUARY = 31,
FEBRUARY = 28,
@tklam
tklam / sbtmkdirs.sh
Created November 28, 2015 14:50 — forked from alvinj/sbtmkdirs.sh
A shell script to create an SBT project directory structure
#!/bin/bash
#------------------------------------------------------------------------------
# Name: sbtmkdirs
# Purpose: Create an SBT project directory structure with a few simple options.
# Author: Alvin Alexander, http://alvinalexander.com
# Info: http://alvinalexander.com/sbtmkdirs
# License: Creative Commons Attribution-ShareAlike 2.5 Generic
# http://creativecommons.org/licenses/by-sa/2.5/
#------------------------------------------------------------------------------
@tklam
tklam / compile_latex.sh
Created July 27, 2015 13:57
compile Latex and Bibtex sources into a pdf
#!/bin/sh
source=`basename $1 .tex`
rm *.bbl}
latex ${source} && bibtex ${source} && latex ${source} && latex ${source}
dvips -t letter ${source}.dvi
ps2pdf -dCompatibilityLevel=1.4 -dPDFSETTINGS=/printer -dMaxSubsetPct=100 \
-dSubsetFonts=true -dEmbedAllFonts=true ${source}.ps
rm ${source}.ps ${source}.out ${source}.log ${source}.aux ${source}.dvi
@tklam
tklam / PKGBUILD
Created July 27, 2015 13:09
PKGBUILD for android-qt5 (Qt 5.4.2) on ArchLinux i686 (https://aur.archlinux.org/packages/android-qt5/)
#PKGCONFIG for android-qt5 for qt 5.3
# Maintainer: Jiaxi Hu <sftrytry _AT_ gmail _DOT_ com>
# Contributor: jimmy00784 <[email protected]>
# Contributor: Ricardo (XenGi) Band <[email protected]>
pkgname='android-qt5'
pkgver=5.4.2
_pkgver=5.4
pkgrel=1
pkgdesc="Qt 5 for Android"