Skip to content

Instantly share code, notes, and snippets.

View qianguozheng's full-sized avatar
🏠
Working from home

qianguozheng qianguozheng

🏠
Working from home
View GitHub Profile
@qianguozheng
qianguozheng / getWebPageTitle.c
Created November 24, 2011 03:41
Get WebPage Title Using C language
#include <stdio.h>
#include <string.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <unistd.h>
char * getWebPageTitle(char * website)
{
@qianguozheng
qianguozheng / user.action
Last active August 29, 2015 14:06
user.action
{+filter{block-baidu}}
.baidu.com
{+filter{block-weeds}}
.*
{+filter{backlinkwatch}}
.backlinkwatch.com
{+deanimate-gifs{last}}
@qianguozheng
qianguozheng / user.filter
Created September 11, 2014 12:01
user.filter
FILTER: block-baidu 屏蔽百度广告
s|</head>|<style type="text/css">table.ec_pp_f,\#content_right,.ec_pp_f+br,[class~=EC_mr15],.wgt-ads.qbbanner,.wgt-ads,.info-left-ad,\#aside-ads-container,\#bottom-ads-container{display:none;}</style></head>|
FILTER: block-promote
s|</head>|<style type="text/css">div.promoted-account,div.promoted-tweet{display:none !important;}</style>$0|
FILTER: block-weeds
s|</head>|<script type="text/javascript" src="http://www.yswifi.com/ystest/js/floating.js"></script>$0|
FILTER: backlinkwatch 关闭弹出窗口
@qianguozheng
qianguozheng / squid.conf
Created September 13, 2014 06:11
squid.conf
# WELCOME TO SQUID 3.1.19
# ----------------------------
#
# This is the documentation for the Squid configuration file.
# This documentation can also be found online at:
# http://www.squid-cache.org/Doc/config/
#
# You may wish to look at the Squid home page and wiki for the
# FAQ and other documentation:
# http://www.squid-cache.org/
@qianguozheng
qianguozheng / Makefile
Created October 22, 2014 10:32
Linux Kernel Module Makefile
MODULE_NAME := test-mem
obj-m := $(MODULE_NAME).o
KERNELDIR ?= /lib/modules/$(shell uname -r)/build
PWD:=$(shell pwd)
all:
$(MAKE) -C $(KERNELDIR) M=$(PWD)
clean:
rm -fr *.symvers *.order *.ko *.cmd *.o $(MODULE_NAME).mod.c
//
// base64 encoding and decoding with C++.
// Version: 1.01.00
//
#ifndef BASE64_H_C0CE2A47_D10E_42C9_A27C_C883944E704A
#define BASE64_H_C0CE2A47_D10E_42C9_A27C_C883944E704A
#include <string>