Skip to content

Instantly share code, notes, and snippets.

View liubiantao's full-sized avatar
🤑
Ad Space(广告位招租)

Haitao liubiantao

🤑
Ad Space(广告位招租)
View GitHub Profile
@liubiantao
liubiantao / Vimium Options.md
Last active May 25, 2016 06:35
Vimium Options

Excluded URLs and keys

http*://mail.google.com/*

Custom key mappings

map j previousTab
map k nextTab
map h goBack
@liubiantao
liubiantao / 0_reuse_code.js
Last active August 29, 2015 14:11
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
-- Custom implementation of 'show' for producing a more readable string
-- representation of BST's (convenient for debugging the 2nd CS4621 assignment).
-- The following data declaration is assumed:
--
-- data BST a = EmptyBST | Node (BST a) a (BST a)
--
-- *** I N S T R U C T I O N S ***
--
-- 1. Copy and paste the following lines at the bottom of your file 'BST.hs'.
-- 2. (Re)load 'BSTplus.hs' in GHCi.
@liubiantao
liubiantao / BSTplus.hs
Created February 20, 2015 17:10
BSTplus.hs
module BSTplus ( module BST, insert, numNodes, sameShape,
numLeaves, minValue, maxValue, height, occurs, mirror, treeSort) where
import BST
--------------------------------------------------------------------------------
-- I N T E R F A C E : P U B L I C : all exports of module 'BST', plus :
--------------------------------------------------------------------------------
-- insert v bst : the BST formed by inserting value 'v' into BST 'bst'
module Graph ( Graph, Node, Edge,
emptyGraph, nodes, node, label,
insertNode, deleteNode, insertEdge, deleteEdge,
outEdges ) where
--------------------------------------------------------------------------------
-- I N T E R F A C E : P U B L I C
--------------------------------------------------------------------------------
-- Graph : a weighted directed graph

Be part of the YAOPAI story!

If you're looking to play a core role in a lean start-up with global reach, big ambitions and a positive culture where you can develop rapidly to your full potential – read on.

  • if you are a fearless and creative technical problem solver
  • are not afraid by confronting and solving new problems
  • are pragmatic and efficient at finding the simple solutions
  • can learn quickly and adapt to new technologies
  • are not afraid to work hard and move fast
  • are not afraid to ask questions or put forward your opinions
@liubiantao
liubiantao / tiebaImgSpider.py
Created April 15, 2016 03:46
贴吧单一帖子大图抓取
#coding:utf8
import urllib
import re
def getHtml(url):
s = urllib.urlopen(url)
content = s.read()
return content
def getImg(html):
# 规则配置仅供参考,适用于 Surge Mac (1.1.0) 及其后续版本;
# 包含 Proxy Group、URL Rewrite 特性;
# 包含 Reject 规则,用于拦截广告、行为分析、数据统计;
# 屏蔽 Hao123、百度搜索,放行百度地图、百度外卖、百度音乐、百度云盘、百度百科。
# Surge for Mac 简明指南 http://bit.ly/1TATRaG
[General]
# warning, notify, info, verbose
skip-proxy = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, 100.64.0.0/10, localhost, *.local
bypass-tun = 0.0.0.0/8, 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12
loglevel = notify
@liubiantao
liubiantao / cloudSettings
Last active December 3, 2018 11:18
vscode_sync
{"lastUpload":"2018-12-03T11:18:25.495Z","extensionVersion":"v3.2.2"}
@liubiantao
liubiantao / background-script.js
Created June 18, 2019 06:01
chrome screen share extenstion demo
// this background script is used to invoke desktopCapture API
// to capture screen-MediaStream.
var screenOptions = ['screen', 'window'];
chrome.runtime.onConnect.addListener(function (port) {
port.onMessage.addListener(portOnMessageHanlder);
// this one is called for each message from "content-script.js"
function portOnMessageHanlder(message) {