Skip to content

Instantly share code, notes, and snippets.

@fwolf
fwolf / mcurl-pornhub.php
Last active September 24, 2023 14:33
Use mcurl.sh to download pornhub video
<?php
if (2 > $argc) {
$basename = basename(__FILE__);
echo "
Usage: $basename PORNHUB_URL
Need mcurl.sh to download video.
Notice: Cannot run on Mac OSX due to mcurl.sh compatible.
@fwolf
fwolf / gb2312-utf8-convert.js
Created February 10, 2015 17:28
Convert between gb2312 and utf8 using javascript
http://freecode-freecode.blogspot.com/2008/11/how-to-gbkgb2312-and-utf-8-encoding.html
GB2312UTF8 = {
Dig2Dec : function(s){
var retV = 0;
if(s.length == 4){
for(var i = 0; i < 4; i ++){
retV += eval(s.charAt(i)) * Math.pow(2, 3 - i);
}
return retV;
@fwolf
fwolf / .gitignore
Last active September 2, 2021 08:59
Query IOTA field score
.idea/
@fwolf
fwolf / create-dir.sh
Last active April 11, 2019 02:24
针对 gb688.cn ,按高度适应,左右分别截图,然后左右合并。
#! /usr/bin/env bash
mkdir left
mkdir right
mkdir pages
@fwolf
fwolf / semote.txt
Created April 28, 2016 03:25
Mud 《书剑》所有 semote 演示,老物,懂的自嗨。
> 【闲聊】屠龙(Tulong):星宿派弟子(初窥门径,autokill)牋星宿海边{s}
> 【闲聊】屠龙(Tulong):采花子(平平淡淡)星宿{nw;w}--要先杀出尘子*(心领神会,autokill&follow&poison),建议放弃
【闲聊】屠龙(Tulong):王坏水(粗通皮毛)牋牋牋扬州{#3n}--要先杀四个衙役(略知一二)
> 【闲聊】屠龙(Tulong):巴依(粗通皮毛) 伊犁*{e}--伊犁夜间关城门
=====================================================================
【闲聊】福音战士(Coolzp):{"不堪一击" "毫不足虑" "不足挂齿" "初学乍练" "初窥门径";;"略知一二" "普普通通" "平平淡淡" "平淡无奇" "粗通皮毛";;"半生不熟" "马马虎虎" "略有小成" "已有小成" "驾轻就熟";;"心领神会" "了然於胸" "略有大成" "已有大成" "豁然贯通";;"出类拔萃" "无可匹敌" "技冠群雄" "神乎其技" "出神入化";;"傲视群雄" "登峰造极" "所向披靡" "一代宗师" "神功盖世";;"举世无双" "惊世骇俗" "震古铄今" "深藏不露" "深不可测";}
【闲聊】紫萱(Sakura):yao tree -> parry,,strike tree ->strike,,,yue tree ->dodge
{"sig":"8a2ba6c5c9db87aaf84173c06f170ba721544f2342cab75796e378fa9af0fdab7c87f14f2a3a3d1eadb01bda7d4d39891afb7048e07becd413415705f266f8b90","msghash":"94d8965f1aaa67efc2ef30555fde967d0eb6e66dcbc1e720650dba4458da9764"}
@fwolf
fwolf / mem.sh
Last active May 28, 2017 09:13
Monitor memory usage in VPS
#! /bin/bash
# https://gist.github.com/fwolf/5856230
#ps aux --width 80 | sort -nrk +6 | head -n 15
# bsdtime is shorter than cputime, hh:mm:ss vs MMM:SS
ps -eo 'user,pid,%cpu,%mem,rss,vsz,stime,bsdtime,s,cmd' --sort '-rss,-vsz' --width 80 | head -n 16
echo
@fwolf
fwolf / btc38-reminder.php
Last active March 11, 2017 08:43
Send reminder when trade price reach setting criteria.
#! /usr/bin/php
<?php
/**
* btc38-reminder.php
*
* Copyright 2013 Fwolf <fwolf.aide+bin.public@gmail.com>
* All rights reserved.
*
* Distributed under the MIT License.
* http://opensource.org/licenses/mit-license
@fwolf
fwolf / gist:fcb3301e245204de0a58
Last active October 22, 2016 11:27
小说树状管理软件,发现大纲 outline 管理软件搬过来用差不多
https://en.wikipedia.org/wiki/Outliner
Vault 3 http://www.ericbt.com/Vault3
似乎不错,单机数据库略微不爽
Code Browser
主要用来看代码的,估计也能凑合来用,数据多了不知会怎样
Outwiker http://jenyay.net/Outwiker/English
似乎不错,使用文件系统作为存储不错,支持 tag,官网俄语不爽
@fwolf
fwolf / .mailcap
Last active October 12, 2016 02:11
Mailcap file for Mutt
# Mailcap for mutt - By Fwolf
# https://gist.github.com/fwolf/f5bf675c80b818bd1941971853ae2422
#application/x-gzip; /bin/gzip -cd '%s'; test=test -n "$DISPLAY"
# Fake cap for pgp signature, got better idea ?
application/pgp-signature; cat '%s'; copiousoutput
image/bmp; display 'bmp:%s'; test=test -n "$DISPLAY"
#text/html; lynx -dump -force_html %s; needsterminal; copiousoutput;