Skip to content

Instantly share code, notes, and snippets.

View tzwm's full-sized avatar
☠️
……

Samwise Wang tzwm

☠️
……
  • nieta
  • Latent Space
  • 03:47 (UTC +08:00)
  • X @tzwm
View GitHub Profile
@tzwm
tzwm / remove_ugly_logo_from_outlook_cn.user.js
Last active December 27, 2017 06:13
Remove ugly logo from partner.outlook.cn
// ==UserScript==
// @name Remove ugly logo from partner.outlook.cn
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author Samwise
// @match https://partner.outlook.cn/*
// @match https://liulishuo01-my.sharepoint.cn/*
// @match https://partner.microsoftonline.cn/*
// @grant none
@tzwm
tzwm / .profile
Created March 11, 2017 08:12 — forked from bmhatfield/.profile
Automatic Git commit signing with GPG on OSX
# In order for gpg to find gpg-agent, gpg-agent must be running, and there must be an env
# variable pointing GPG to the gpg-agent socket. This little script, which must be sourced
# in your shell's init script (ie, .bash_profile, .zshrc, whatever), will either start
# gpg-agent or set up the GPG_AGENT_INFO variable if it's already running.
# Add the following to your shell init to set up gpg-agent automatically for every shell
if [ -f ~/.gnupg/.gpg-agent-info ] && [ -n "$(pgrep gpg-agent)" ]; then
source ~/.gnupg/.gpg-agent-info
export GPG_AGENT_INFO
else
def generate_signaling_key(key_ver: '1', account:, expired_at: 0)
app_id = SecretSettings.agora.app_id
app_cert = SecretSettings.agora.app_cert
expired_at = expired_at.to_i
sign_content = [account, app_id, app_cert, expired_at].join
sign = Digest::MD5.hexdigest(sign_content)
[key_ver, app_id, expired_at, sign].join(':')
end
# coding=utf-8
from pyquery import PyQuery as pq
import sys
def main():
reload(sys)
sys.setdefaultencoding('utf-8')
page = 0