Skip to content

Instantly share code, notes, and snippets.

Lance Liao lanceliao

Block or report user

Report or block lanceliao

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
lanceliao / wg-client1.conf
Last active Aug 2, 2018
Sample WireGuard configuration files
View wg-client1.conf
Address =
PrivateKey = [Client's private key]
PublicKey = [Server's public key]
PresharedKey = [Pre-shared key, same for server and client]
Endpoint = [Server Addr:Server Port]
AllowedIPs =
lanceliao / 0ssd_smart.service
Last active Oct 4, 2015
record SSD smart status to a file on startup and suspend
View 0ssd_smart.service
Description=Record SSD smart status
lanceliao /
Created Sep 27, 2015
set different scaling on an extend screen, this script is expected to solve the scaling problem on HiDPI screens of Linux
# extend second screen with different scaling
# Copyright (C) 2015
# REF: 1.
# 2.
# 3.
View gist:bdb6bc4cf38e3bd0097c
background yes
use_xft yes
xftfont 123:size=6
xftalpha 0.1
update_interval 2
total_run_times 0
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
View Linux系统下shadowsocks透明代理的配置.md
  1. 开启ipv4转发
vi /etc/sysctl.conf
# 将net.ipv4.ip_forward=0更改为net.ipv4.ip_forward=1
sysctl -p
  1. 安装dnsmasq 和pdnsd解决dns污染

DNS的解析方案为 resolve.conf ==> dnsmasq ==> pdnsd

lanceliao /
Last active Jan 20, 2020
#!/usr/bin/env python
# Generate a list of dnsmasq rules with ipset for gfwlist
# Copyright (C) 2014
# Ref
import urllib2
import re
lanceliao /
Created Aug 19, 2014
OpenWrt USB转串口模块的调试


opkg install kmod-usb-serial kmod-usb-serial-pl2303


insmod usbserial
insmod pl2303
lanceliao /
Last active Aug 13, 2017
Configure LUCI on lighttpd


opkg install lighttpd lighttpd-mod-cgi



  1. static-file.exclude-extensions = (".php", ".pl", ".fcgi")改成static-file.exclude-extensions = (".php", ".pl", ".fcgi", ".lua")
lanceliao /
Last active Dec 19, 2019
Samba on OpenWrt 配置


opkg update && opkg install samba luci-app-samba



config sambashare
lanceliao /
Created Aug 14, 2014
Raspberry Pi WIFI protect script - auto reconnect when AP is powered on after a powered off. call this script in crontab.
export PATH=$PATH:/sbin
# Auto reconnect to specified WIFI access point if there is no internect connection
# Author: Lance
# Website:
# Last updated: 2013/05/25
#your WIFI SSID here to be auto connect
You can’t perform that action at this time.