Skip to content

Instantly share code, notes, and snippets.

🍊
Work hard

garden.yuen weaming

Block or report user

Report or block weaming

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View top-domains.json
[
".aaa",
".aarp",
".abarth",
".abb",
".abbott",
".abbvie",
".abc",
".abogado",
".abudhabi",
View git-handy.sh
# vim: filetype=sh
# git
alias gconf='vi .git/config'
alias gamend='git commit --amend'
alias gamendy='git commit --amend --no-edit'
alias gback='git reset --hard HEAD~'
alias gl='git lg'
function greset() {
git reset --hard "${1:-HEAD}"
View run-multiple-lines-of-shell.py
#!/usr/bin/env python3
# coding: utf-8
"""
Author : weaming
Created Time : 2019-04-24 12:41:48
"""
import subprocess
import sys
import os
@weaming
weaming / sqlfmt.py
Created Apr 18, 2019
Format `mysqldump` sql file into editable style.
View sqlfmt.py
#!/usr/bin/env python3
# coding: utf-8
"""
Author : weaming
Created Time : 2019-04-18 15:18:31
"""
import sys
import argparse
View temp-mariadb-in-docker-for-test-purpose.py
"""
pip install docker mysqlclient peewee
"""
import os
import random
import time
import datetime
from playhouse.db_url import parseresult_to_dict, urlparse
import MySQLdb
View spacemacs.el
;; -*- mode: emacs-lisp -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory as ~/.spacemacs
;; Use "SPC f e d" to open it
;; TODO:
;; change temp file directory
;; show code tree
;; open file in new window when searching recent files
;; open file in special window when navigate in file tree
View keybase.md

Keybase proof

I hereby claim:

  • I am weaming on github.
  • I am weaming (https://keybase.io/weaming) on keybase.
  • I have a public key ASAVXvq5MKcxCiNGC81R5rF02aW4IaoBRgh3GrbRC-ufswo

To claim this, I am signing this object:

@weaming
weaming / MyKeyMap.js
Last active Apr 11, 2019
Tampermonkey script to define my personal key mapping using in chrome browser <3
View MyKeyMap.js
// ==UserScript==
// @name MyKepMap
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author weaming
// @match *://*/*
// @grant none
// ==/UserScript==
View caching.py
import time
import os
import hashlib
from threading import Lock
from collections import namedtuple
from project.settings import BASE_DIR, CACHE_IMAGE_MAXSIZE, CACHE_IMAGE_TTL
CacheValue = namedtuple("CacheValue", ["ts", "value"])
View dict-differ.py
#!/usr/bin/env python3
# coding: utf-8
"""
Author : weaming
Created Time : 2019-01-17 14:34:26
"""
import os
import sys
import json
import argparse
You can’t perform that action at this time.