Skip to content

Instantly share code, notes, and snippets.

Avatar

qianguozheng qianguozheng

View GitHub Profile
View gist:10b56d993708fdd68beccb8801b48417
//
// 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>
@qianguozheng
qianguozheng / Makefile
Created Oct 22, 2014
Linux Kernel Module Makefile
View 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
View 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/
View 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 关闭弹出窗口
View user.action
{+filter{block-baidu}}
.baidu.com
{+filter{block-weeds}}
.*
{+filter{backlinkwatch}}
.backlinkwatch.com
{+deanimate-gifs{last}}
@qianguozheng
qianguozheng / getWebPageTitle.c
Created Nov 24, 2011
Get WebPage Title Using C language
View getWebPageTitle.c
#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)
{
You can’t perform that action at this time.