Skip to content

Instantly share code, notes, and snippets.

💭
Too many projects need updating. So let me play console games a while first. =.=

田生 tiansh

💭
Too many projects need updating. So let me play console games a while first. =.=
  • 天津
View GitHub Profile
View jjwxc-download.js
/*
* 从 jjwxc.net 下载文章
* 使用方法:
* 1. 打开网址 http://www.jjwxc.net/onebook.php?novelid=0000000 (替换000为需要的数字)
* 2. 打开网页控制台
* 3. 把这段粘贴进去
* 4. 等一段时间,浏览器提示你要下载时,确认下载
*/
const decoder = new TextDecoder('gbk');
const parser = new DOMParser();
View manifest.json
{
"manifest_version": 2,
"name": "Options Sample",
"description": "Options Sample",
"version": "1.0",
"options_ui": {
"page": "options.html"
},
@tiansh
tiansh / Redirector.json
Created Oct 25, 2018
Config redirector to make some stupid sites work correctly
View Redirector.json
{
"createdBy": "Redirector v3.2.1",
"redirects": [{
"description": "Google, Use ENGLISH plz",
"exampleUrl": "https://www.google.com/search?q=google",
"exampleResult": "https://www.google.com/search?hl=en&q=google",
"error": null,
"includePattern": "^(https://www.google.com/search\\?)((?!hl=)(?:.(?!&hl=))*)$",
"excludePattern": "",
"patternDesc": "",
@tiansh
tiansh / mo.lua
Created Jan 25, 2016
莫尔斯电码输入 - 谷歌拼音输入法扩展
View mo.lua
function Morse(ori)
MorseMapping = {
["a"] = ".−",
["b"] = "−...",
["c"] = "−.−.",
["d"] = "−..",
["e"] = ".",
["f"] = "..−.",
["g"] = "−−.",
@tiansh
tiansh / Weibo_Disable_Hotkeys.user.js
Created Jan 3, 2016
【用户脚本】微博热键禁用
View Weibo_Disable_Hotkeys.user.js
// ==UserScript==
// @name Weibo Disable Hotkeys
// @name:zh 微博热键禁用
// @namespace https://github.com/tiansh/
// @description 禁用微博的热键
// @include http://www.weibo.com/*
// @include http://weibo.com/*
// @include http://d.weibo.com/*
// @include http://s.weibo.com/*
// @exclude http://weibo.com/a/bind/*
@tiansh
tiansh / rmroot.sh
Created May 31, 2015
Example of how curl|sh works
View rmroot.sh
sudo rm -rf --no-preserve-root
@tiansh
tiansh / capslock.ahk
Created Oct 13, 2014
Hold CapsLock to switch letter case, press CapsLock works as Esc
View capslock.ahk
#SingleInstance force
#MaxHotkeysPerInterval 100
#UseHook
#NoTrayIcon
Process, Priority,, Realtime
SetKeyDelay -1
tli := false
cli := false
View .vimrc
set nocompatible
behave mswin
" Dvorak键盘布局
" J <-> T
noremap t j
noremap T J
noremap j t
noremap J T
" K <-> N
You can’t perform that action at this time.