Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@leechannl
leechannl / init.vim
Created June 29, 2017 02:46
spacevim config
scriptencoding utf-8
let g:spacevim_enable_debug = 1
let g:spacevim_realtime_leader_guide = 1
call SpaceVim#layers#load('incsearch')
call SpaceVim#layers#load('lang#c')
call SpaceVim#layers#load('lang#elixir')
call SpaceVim#layers#load('lang#go')
call SpaceVim#layers#load('lang#haskell')
call SpaceVim#layers#load('lang#java')
@leechannl
leechannl / dnsmasq-gfwlist.py
Created February 9, 2017 03:00 — forked from lanceliao/dnsmasq-gfwlist.py
将gfwlist转换成带ipset的dnsmasq规则,适用于OpenWrt智能上网
#!/usr/bin/env python
#coding=utf-8
#
# Generate a list of dnsmasq rules with ipset for gfwlist
#
# Copyright (C) 2014 http://www.shuyz.com
# Ref https://code.google.com/p/autoproxy-gfwlist/wiki/Rules
import urllib2
import re
@leechannl
leechannl / installation.md
Last active June 29, 2017 02:37 — forked from guillaumevincent/installation.md
install PyQt5 on Mac OS X 10.9 and use python 3.4 on a virtualenv.

Guide to install PyQt5 on Mac OS X with python 3.5 virtualenv

Description

A simple guide to install PyQt5 on Mac OS X 10.11 and use python 3.5 on a virtualenv.

Requirements

  • xcode latest
  • python 3.5.1
  • Qt libraries 5.6.0
@leechannl
leechannl / emoji.json
Last active November 25, 2019 17:15
iOS input emoji mapping
{"墨鏡":{"emoji":["😎"]},
"泰國":{"emoji":["🇹🇭"]},
"南苏丹共和国":{"emoji":["🇸🇸"]},
"让利":{"emoji":["🈹️"]},
"男性":{"emoji":["🚹"]},
"向日葵":{"emoji":["🌻"]},
"營":{"emoji":["🈺️"]},
"斯里兰卡":{"emoji":["🇱🇰"]},
"兔子脸":{"emoji":["🐰"]},
"虫子":{"emoji":["🐛","🐜"]},
@leechannl
leechannl / retry_decorator.py
Created November 23, 2012 07:33
Roll to get the ultimate answer of life, universe, and everything.
import time
import math
import random
import sys
# Retry decorator with exponential backoff
def retry(tries, delay=3, backoff=2):
'''Retries a function or method until it returns True.
delay sets the initial delay in seconds, and backoff sets the factor by which