Skip to content

Instantly share code, notes, and snippets.

View huzhifeng's full-sized avatar

Zhifeng Hu huzhifeng

View GitHub Profile
#include <netdb.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#define CANARY "in_the_coal_mine"
struct {
char buffer[1024];
@huzhifeng
huzhifeng / itgonglun.bat
Created March 15, 2015 14:21
用于下载IT公论音频的批处理脚本
for /l %%x in (1, 1, 143) do (
echo %%x
wget http://ipn.li/itgonglun/%%x/audio.mp3 -O %%x.mp3
)
for %%x in (
"http://screencasts.b0.upaiyun.com/podcasts/teahour_episode_76.m4a"
"http://screencasts.b0.upaiyun.com/podcasts/teahour_episode_75.mp3"
"http://screencasts.b0.upaiyun.com/podcasts/teahour_episode_74.m4a"
"http://screencasts.b0.upaiyun.com/podcasts/teahour_episode_73.m4a"
"http://screencasts.b0.upaiyun.com/podcasts/teahour_episode_72.m4a"
"http://screencasts.b0.upaiyun.com/podcasts/teahour_episode_71.m4a"
"http://screencasts.b0.upaiyun.com/podcasts/teahour_episode_70.m4a"
"http://screencasts.b0.upaiyun.com/podcasts/teahour_episode_69.m4a"
"http://screencasts.b0.upaiyun.com/podcasts/teahour_episode_68.m4a"
@huzhifeng
huzhifeng / splinter_qzone.py
Created April 16, 2015 06:05
Splinter自动登录QQ空间并发表说说
#!/usr/bin/python
# -*- coding: utf-8 -*-
#encoding=utf-8
import sys
import time
from splinter import Browser
browser = Browser()
@huzhifeng
huzhifeng / gpio_button_test.example
Created November 3, 2015 12:58
Shell scripts used to test GPIO LEDs and buttons, fork and improve based on http://wiki.openwrt.org/doc/devel/add.new.device
Single GPIO test
root@OpenWrt:/# gpio_button_test.sh 1 1
[GPIO1] value 0
root@OpenWrt:/#
GPIO range test
root@OpenWrt:/# gpio_button_test.sh 0 2
[GPIO0] value 0
[GPIO1] value 0
[GPIO2] value 0

Specs

  • CoovaChilli 是一个开源的软件访问控制工具(access controller), 基于曾经流行的ChilliSpot项目, 并且被原来的ChilliSpot贡献者们维护.
  • CoovaChilli 是一个功能丰富的软件访问控制工具提供一个网页认证(captive portal) / walled-garden 环境和使用RADIUS或者HTTP协议来访问控制(access provisioning)和账户认证(accounting).
  • CoovaChillis是CoovaAP OpenWRT固件的一部分, 专门用于热点.

Details

拓扑图

References

diff --git a/.config b/.config
index cc8d14f..26c0f5f 100644
--- a/.config
+++ b/.config
@@ -385,9 +385,10 @@ CONFIG_TARGET_SUFFIX="uclibc"
# CONFIG_IB is not set
# CONFIG_SDK is not set
# CONFIG_MAKE_TOOLCHAIN is not set
-# CONFIG_IMAGEOPT is not set
-# CONFIG_PREINITOPT is not set
@huzhifeng
huzhifeng / Linux Static IP
Created August 10, 2016 09:13 — forked from fernandoaleman/Linux Static IP
How To Configure Static IP On CentOS 6
## Configure eth0
#
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
NM_CONTROLLED="yes"
ONBOOT=yes
HWADDR=A4:BA:DB:37:F1:04
TYPE=Ethernet
BOOTPROTO=static
@huzhifeng
huzhifeng / 90-tty-usb.rules
Created August 22, 2016 03:28
udev rule for usb serial
/etc/udev/rules.d/90-tty-usb.rules
# CP210x
SUBSYSTEMS=="usb", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea60", MODE="0666"
How to add udev rule for usb serial device
[huzhifeng@CentOS72 ~]$ minicom
Cannot create lockfile for /dev/ttyUSB0: 权限不够
[huzhifeng@CentOS72 ~]$ su root -l
[root@CentOS72 ~]# ls -al /dev/ttyUSB0
crw-rw---- 1 root dialout 188, 0 8月 22 08:59 /dev/ttyUSB0