Skip to content

Instantly share code, notes, and snippets.

View tiansh's full-sized avatar
🎮
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
@tiansh
tiansh / .vimrc
Last active September 30, 2016 06:23
set nocompatible
behave mswin
" Dvorak键盘布局
" J <-> T
noremap t j
noremap T J
noremap j t
noremap J T
" K <-> N
@tiansh
tiansh / capslock.ahk
Created October 13, 2014 06:57
Hold CapsLock to switch letter case, press CapsLock works as Esc
#SingleInstance force
#MaxHotkeysPerInterval 100
#UseHook
#NoTrayIcon
Process, Priority,, Realtime
SetKeyDelay -1
tli := false
cli := false
@tiansh
tiansh / rmroot.sh
Created May 31, 2015 14:19
Example of how curl|sh works
sudo rm -rf --no-preserve-root
@tiansh
tiansh / Weibo_Disable_Hotkeys.user.js
Created January 3, 2016 13:36
【用户脚本】微博热键禁用
// ==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 / mo.lua
Created January 25, 2016 04:29
莫尔斯电码输入 - 谷歌拼音输入法扩展
function Morse(ori)
MorseMapping = {
["a"] = ".−",
["b"] = "−...",
["c"] = "−.−.",
["d"] = "−..",
["e"] = ".",
["f"] = "..−.",
["g"] = "−−.",
@tiansh
tiansh / Redirector.json
Created October 25, 2018 10:30
Config redirector to make some stupid sites work correctly
{
"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 / manifest.json
Created December 7, 2018 04:05
Options Sample
{
"manifest_version": 2,
"name": "Options Sample",
"description": "Options Sample",
"version": "1.0",
"options_ui": {
"page": "options.html"
},
/*
* 从 jjwxc.net 下载文章
* 使用方法:
* 1. 打开网址 http://www.jjwxc.net/onebook.php?novelid=0000000 (替换000为需要的数字)
* 2. 打开网页控制台
* 3. 把这段粘贴进去
* 4. 等一段时间,浏览器提示你要下载时,确认下载
*/
const decoder = new TextDecoder('gbk');
const parser = new DOMParser();