Skip to content

Instantly share code, notes, and snippets.

View YieldNull's full-sized avatar
😃

YieldNull

😃
View GitHub Profile
@YieldNull
YieldNull / readme.md
Last active July 14, 2021 04:31
爬取新浪微博中指定用户所有相册图片,并保存到本地

功能

给定用户的ID(微相册的数字ID,非昵称),下载用户相册中所有图片到本地

所需模块

rsa,threadpool

登陆

请先更改login_weibo中的用户名及密码

用法

@YieldNull
YieldNull / ruijie.py
Last active November 17, 2015 15:43
Login in WHU Dormitory Network(登陆武汉大学宿舍校园网)网页认证
#!/usr/bin/env python
# coding:utf-8
"""
Login in WHU Dormitory Network
Usage:
Usage: ruijie.py [-l]
-l to logout
@YieldNull
YieldNull / neteasy.py
Last active October 26, 2015 12:26
Backup your neteasy blog entries to a sqlite3 database (备份网易博客)
#!/usr/bin/env python
# coding:utf-8
"""
Backup your neteasy blog entries to a sqlite3 database
Usage neteasy.py <username>
The username is your blog name which appears in your blog domain.
Just like "junjie.blog.163.com", in which "junjie" is the <username>
@YieldNull
YieldNull / CParser.jj
Created October 27, 2015 07:28
C grammar defintion for use with JavaCC.(Copied from https://java.net/downloads/javacc/contrib/grammars/C.jj)
/*
C grammar defintion for use with JavaCC
Contributed by Doug South ([email protected]) 21/3/97
This parser assumes that the C source file has been preprocessed : all
#includes have been included and all macros have been expanded. I accomplish
this with "gcc -P -E <source file> > <output file>".
There is a problem with compiler specific types, such as __signed, __const,
@YieldNull
YieldNull / R2LParser.c
Created November 1, 2015 12:44
Recognize C Pointer Declaration(识别C语言指针表达式)
/*
* R2LParser.c
*
* Recognize C declaration use Right-Left Method(from http://ieng9.ucsd.edu/~cs30x/rt_lt.rule.html)
*
* The "right-left" rule is a completely regular rule for deciphering C
* declarations. It can also be useful in creating them.
*
* First, symbols. Read
* * as "pointer to" - always on the left side
#!/usr/bin/env python
# coding:utf-8
"""
A 'Crawler' for http://msdn.itellyou.cn/
"""
import re
import urllib
import urllib2
@YieldNull
YieldNull / goslate.py
Created November 17, 2015 13:47
Translate English and Chinese mutually using https://translate.google.com.hk
#!/usr/bin/env python
# coding:utf-8
"""
Translate English and Chinese mutually using https://translate.google.com.hk
create on '11/5/15 5:07 PM'
"""
import gzip
import httplib
@YieldNull
YieldNull / download.py
Last active October 9, 2020 10:51
将飞图网某页面下所有发布在百度云上的资源转存到百度云,并下载,解压再上传
#!/usr/bin/env python
#coding:utf-8
"""
download files from pan.baidu.com using https://github.com/PeterDing/iScript/blob/master/pan.baidu.com.py#pan.baidu.com.py
use crontab to run it in a specific time interval to check if it has failed
if failed, restart it
Created on 2015.10.31
"""
@YieldNull
YieldNull / readme.md
Created November 17, 2015 15:27
备份QQ空间说说

#功能 备份QQ空间说说(先用浏览器登陆获取Cookie)

#用法 先将Cookie及用户写入config.json中,格式如下

{
	"shuoshuo":"<shuoshuo_cookie>",
	"friends":"<friends_cookie>",
@YieldNull
YieldNull / hexout.c
Created November 21, 2015 07:02
Display memory block via Hexadecimal.
#include <stdio.h>
/**
* Display memory block via Hexadecimal.
* From lower to higher address.
**/
void hexOut(unsigned char c) {
printf("%x", c & 0xF);
printf("%x", (c >> 4) & 0xF);