Skip to content

Instantly share code, notes, and snippets.


garden.yuen weaming

View GitHub Profile
import json
from functools import wraps
import requests
allow_methods = [
weaming /
Last active Jun 2, 2020
Install python with tk supported via pyenv on macOS.
# NOTE: following steps does work on my macOS 10.15.4, pyenv 1.2.18 :(
# Error example:
# ERROR: invalid Python executable: /Users/weaming/.pyenv/versions/3.8.2/bin/python3.8
# The python-build could not find proper executable of Python after successful build.
# Finally solution: download .pkg installer from
# it includes its own private version of Tcl/Tk 8.6. It does not use any system-supplied or third-party supplied versions of Tcl/Tk.
View elisp-in-15-min.el
(+ 1 (+ 3 4))
(setq name "weaming")
(defun hello (name) (insert "Hello, " name))
(hello "weaming")
(switch-to-buffer-other-window "*test*")
(switch-to-buffer-other-window "*test*")
(hello "you")
weaming /
Last active May 21, 2020
数据结构:堆 heap
# Created : 2020-05-22 00:14:21
# 创建和调整:
# 插入和删除:
import operator
default_op =
def heap_adjust(A, i, size, op):
weaming /
Last active May 16, 2020
阿里云邮件推送服务 Python 发送示例
import time, datetime
import hmac
import base64
from urllib.parse import quote
View MacOS X El Capitan with Vagrant - MacOS X VM on Windows or
weaming / haproxy.cfg
Created May 11, 2020 — forked from cmer/haproxy.cfg
Simple, no bullshit TCP port forwarding using HAProxy
View haproxy.cfg
listen l1
mode tcp
timeout connect 4000
timeout client 180000
timeout server 180000
server srv1
View shortkeys.export.json
[{"key":", .","action":"javascript","blacklist":false,"sites":"**","open":false,"code":"location.pathname = '/';","exported":true,"sitesArray":["**"],"customName":"goto root"},{"key":", ,","action":"javascript","blacklist":false,"sites":"**","open":false,"code":" = \"\";\nlet newPath = location.pathname\n .split(\"/\")\n .filter(x => x.length > 0)\n .slice(0, -1)\n .join(\"/\");\nlocation.pathname = newPath;","customName":"goto upper","exported":true,"sitesArray":["**"]}]
apt-get update; apt-get install -y curl wget unzip
curl -sfL | sh -
kubectl create ns kubeless
kubectl create -f
wget -O; \
unzip; \
mv bundles/kubeless_linux-amd64/kubeless /usr/local/bin; \
rm -rf bundles/
View emojione.css
@font-face {
font-family: 'EmojiOne';
src: url('');
You can’t perform that action at this time.