Skip to content

Instantly share code, notes, and snippets.

@snowleung
snowleung / wxcheckin.json
Last active January 30, 2018 03:34
test config
[{"who": "招商银行信用卡", "content": "签到"}]
@snowleung
snowleung / keywords.txt
Created June 8, 2017 13:05
pychpgoodskeyword
意利,尿片,定时开关,书立,玻璃保鲜
@snowleung
snowleung / startup.yml
Last active May 4, 2017 08:21
ansible playbook to set up your mac, include
---
# ## osx startup
# ansible playbook to set up your mac, include:
# * oh~my~zsh
# * pyenv
# * pyenv-virtualenv
# ## dependency
@snowleung
snowleung / startup.yml
Created May 2, 2017 14:44
ansible playbook to set up your mac, include
---
# ## osx startup
# ansible playbook to set up your mac, include:
# * oh~my~zsh
# * pyenv
# * pyenv-virtualenv
# * emacs
@snowleung
snowleung / startup.yml
Created May 2, 2017 14:44
ansible playbook to set up your mac, include
---
# ## osx startup
# ansible playbook to set up your mac, include:
# * oh~my~zsh
# * pyenv
# * pyenv-virtualenv
# * emacs
@snowleung
snowleung / startup.yml
Created May 2, 2017 14:44
ansible playbook to set up your mac, include:
---
# ## osx startup
# ansible playbook to set up your mac, include:
# * oh~my~zsh
# * pyenv
# * pyenv-virtualenv
# * emacs
@snowleung
snowleung / a.c
Created April 27, 2017 04:37
[APUE] NO BLOCK IO
/* [APUE] P356 Polling Example */
/* ./a.out < /var/log/daily.out 2>stderr.out */
/* Environments OSX */
/* gcc -v */
/* Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 */
/* Apple LLVM version 8.0.0 (clang-800.0.42.1) */
/* Target: x86_64-apple-darwin15.6.0 */
/* Thread model: posix */
/* InstalledDir: /Library/Developer/CommandLineTools/usr/bin */
@snowleung
snowleung / pymail.py
Created March 19, 2017 04:13
Python Mail
# coding:utf-8
import smtplib
import email
from email.MIMEMultipart import MIMEMultipart
from email.MIMEText import MIMEText
class Pymail(object):
@snowleung
snowleung / ranking.py
Created February 12, 2017 13:17
ranking
# conding:uft-8
class User(object):
def __init__(self, _id=None):
self._id = _id
def score(self, resource, score, frequency=1):
resource.scores = resource.scores + score
@snowleung
snowleung / dread.py
Created April 12, 2016 04:17
daily read
dr_2016_04_12 = ["SLA", "http://www.ibm.com/developerworks/cn/webservices/ws-sla/"]