This is a very simple HTTP server for Unix, using fork(). It's very easy to use
- include header
httpd.h - write your route method, handling requests.
- call
serve_forever("12913")to start serving on port 12913
| #!/bin/bash | |
| #----------------------------------------- | |
| # 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` |
| var parseString = require('xml2js').parseString; | |
| var fs = require("fs"); | |
| var path = require("path"); | |
| var targetPath = "/home/laobubu/jekyll/_posts"; | |
| var wpXMLFile = "wordpress.xml"; | |
| try { | |
| fs.mkdirSync(targetPath); | |
| } catch (er){} |
| /** | |
| * Typecho to Jekyll & DuoShuo | |
| * | |
| * @author laobubu.net | |
| * | |
| * 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` |
| /** | |
| 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 |
| /** | |
| HyperMD breaks the wall between Preview and Writing for Markdown. | |
| @see https://github.com/laobubu/HyperMD/ | |
| 此脚本可以帮助你在 V2EX 发帖界面体验 HyperMD 的强大功能。 | |
| 使用方法: | |
| 1. 打开发帖界面 https://www.v2ex.com/new | |
| 2. 在地址栏输入以下地址并回车 [^1] |
一个超级简单的验证码识别。据说准确率比深度学习还要高哦(ε=ε=ε=┏(゜v゜;)┛
依赖:pip install Pillow
来源是 V2EX 上被喷惨的帖子: https://www.v2ex.com/t/354318
Author: laobubu
(纯粹个人兴趣掐着表写的,没收钱。一个小时内写完。PIL 的文档真难看。)
| // ==UserScript== | |
| // @name 去你大爷的 CSDN 全文阅读 | |
| // @namespace http://tampermonkey.net/ | |
| // @version 0.1 | |
| // @description 把登录后查看全文阅读的那个啥玩意儿给干掉 | |
| // @author laobubu | |
| // @match http://blog.csdn.net/*/article/details/* | |
| // @grant none | |
| // ==/UserScript== |
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.