Skip to content

Instantly share code, notes, and snippets.



View GitHub Profile
laobubu /
Last active Apr 10, 2020
njq (No jQuery) use vanilla DOM API with jQuery-like functions.

njq (No jQuery)

Vanilla JavaScript is good but the function names are too long. Now, you can use vanilla DOM API with jQuery-like functions.

Only ~1kB (without gzip) after uglifying. You can even tailor for yourself to make it much smaller, by deleting/adding modules. A good choice to manipulate DOM for side projects.


View 去你大爷的 CSDN 全文阅读.user.js
// ==UserScript==
// @name 去你大爷的 CSDN 全文阅读
// @namespace
// @version 0.1
// @description 把登录后查看全文阅读的那个啥玩意儿给干掉
// @author laobubu
// @match*/article/details/*
// @grant none
// ==/UserScript==
laobubu /
Last active Apr 7, 2019
Stupid CAPTCHA OCR written in 1 hour


依赖:pip install Pillow

来源是 V2EX 上被喷惨的帖子:

Author: laobubu

(纯粹个人兴趣掐着表写的,没收钱。一个小时内写完。PIL 的文档真难看。)

laobubu / hypermd-v2ex.js
Last active Mar 5, 2019
HyperMD for V2EX
View hypermd-v2ex.js
HyperMD breaks the wall between Preview and Writing for Markdown.
此脚本可以帮助你在 V2EX 发帖界面体验 HyperMD 的强大功能。
1. 打开发帖界面
2. 在地址栏输入以下地址并回车 [^1]
laobubu /
Last active Feb 15, 2021
A very simple HTTP server in C, for Unix, using fork()

Pico HTTP Server in C

This is a very simple HTTP server for Unix, using fork(). It's very easy to use

How to use

  1. include header httpd.h
  2. write your route method, handling requests.
  3. call serve_forever("12913") to start serving on port 12913
laobubu / lite-server-plus.js
Last active Mar 19, 2020
A Enhanced lite-server tool with sass watching
View lite-server-plus.js
Enhanced lite-server tool with sass watching.
## What it does
0. run `lite-server`
1. watch `scss/*.scss` and compile into `style/*.css`
## How to use
laobubu / typecho-to-jekyll-and-duoshuo.js
Last active May 21, 2018
Convert Typecho to Jekyll & DuoShuo
View typecho-to-jekyll-and-duoshuo.js
* Typecho to Jekyll & DuoShuo
* @author
* Usage:
* 1. run `npm install dateformat`
* 2. export table `typecho_comments` and `typecho_contents` as two json files. you can do this with PHPMySQLAdmin
* 3. edit this file, especially line 15 - 20
* 4. run `node t2jd.js`
laobubu / wordpress2jekyll.js
Created Jan 4, 2016
Convert WordPress exported XML to Jekyll Posts
View wordpress2jekyll.js
var parseString = require('xml2js').parseString;
var fs = require("fs");
var path = require("path");
var targetPath = "/home/laobubu/jekyll/_posts";
var wpXMLFile = "wordpress.xml";
try {
} catch (er){}
laobubu /
Last active Jul 13, 2016
Customize a newly-installed Ubuntu, easily.
# Personal PC Setup
# Warning:
# Modify this script to make it work for you properly.
# The author makes no warranty or guarantee.
# What does this do
# - Install `apt-fast screen aria2c`