Skip to content

Instantly share code, notes, and snippets.

@dofine
dofine / cvimrc
Last active August 29, 2015 14:10
cVimrc for cVim extension for chrome
let nextmatchpattern="\s*下一页|下一张|下一篇|下页|后页\s*,^\b(N|n)ext\b,\\bnext\\b,^>$,^(>>|»)$,^(>|»),(>|»)$,\\bmore\\b"
let previousmatchpattern="\s*上一页|上一张|上一篇|上页|前页\s*,^\b(p|P)rev|(p|P)revious\b,\\bprev|previous\\b,^<$,^(<<|«)$,^(<|«),(<|«)$"
let searchengine g6 = "https://ipv6.google.com/search?q=%s"
let searchalias g = "g6"
let mapleader = ","
let qmark a = ["http://v2ex.com", "http://twitter.com"]
" You can use <Space>, which is interpreted as a
" literal " " character, to enter buffer completion mode
map gb :buffer<Space>
@dofine
dofine / setAutoPac
Created January 27, 2015 14:08
OS X set autoproxy pac file from command line
networksetup -setautoproxyurl Wi-Fi http://192.168.95.1:28080/pac
@dofine
dofine / 0_reuse_code.js
Last active August 29, 2015 14:21
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@dofine
dofine / chat.py
Created March 27, 2016 17:59
chat api
# -*- coding: utf-8 -*-
from __future__ import division, print_function
import logging
import os
from cookielib import LWPCookieJar
import requests
```python
import asyncio
from aiohttp import ClientSession, CookieJar
import os
import json
import pickle
import http.cookiejar
cj = http.cookiejar.MozillaCookieJar('cookies.txt')
cj.load()
@dofine
dofine / gist:adce618529efd5667c6caef7d8f45f25
Created June 11, 2018 08:50
autohotkey capslock ctrl
; Sends Esc if capslock is pressed alone
; Sends Ctrl+key if capslock is pressed with another key
; TODO: work with arrow keys and other modifiers (e.g. shift, control)
SetCapsLockState AlwaysOff
CapsLock::Send {esc}
CapsLock & a::Send ^a
CapsLock & b::Send ^b
CapsLock & c::Send ^c
CapsLock & d::Send ^d
# Rime schema
# encoding: utf-8
schema:
schema_id: double_pinyin_flypy
name: 小鶴雙拼
version: "0.18"
author:
- double pinyin layout by 鶴
- Rime schema by 佛振 <chen.sst@gmail.com>
// an example to create a new mapping `ctrl-y`
mapkey('<Ctrl-y>', 'Show me the money', function() {
Front.showPopup('a well-known phrase uttered by characters in the 1996 film Jerry Maguire (Escape to close).');
});
// an example to replace `T` with `gt`, click `Default mappings` to see how `T` works.
map('gt', 'T');
// an example to remove mapkey `Ctrl-i`
unmap('<Ctrl-i>');
@dofine
dofine / 导出京东订单.js
Created August 6, 2020 04:54
导出京东订单
// ==UserScript==
// @name 导出京东订单
// @namespace win.somereason.web.utils
// @version 2018.07.23.1
// @description 这个脚本帮助你导出京东的订单列表页中的订单,仅限本页.
// @author somereason
// @date 2019-04-29
// @match *://order.jd.com/center/list.action*
// @grant none
// ==/UserScript==
⚔️ Dota 2 🕘 1845 hrs 33 mins
🍳 PUBG: BATTLEGROUNDS 🕘 291 hrs 36 mins
🎮 Dota Underlords 🕘 228 hrs 25 mins
🎮 Sekiro™: Shadows Die Twice 🕘 61 hrs 26 mins
🎮 The Witcher 3: Wild Hunt 🕘 9 hrs 55 mins