Skip to content

Instantly share code, notes, and snippets.

View zjyExcelsior's full-sized avatar

Zhu Jiongyao zjyExcelsior

View GitHub Profile
@zjyExcelsior
zjyExcelsior / LICENCE SUBLIME TEXT
Created October 6, 2018 15:57
Sublime Text 3 Serial key build is 3176
## Sublime Text 3 Serial key build is 3176
> * Added these lines into /etc/hosts
127.0.0.1 www.sublimetext.com
127.0.0.1 license.sublimehq.com
> * Used the license key
----- BEGIN LICENSE -----
@zjyExcelsior
zjyExcelsior / git-branch.md
Created September 2, 2018 08:30 — forked from yisibl/git-branch.md
在Mac、Linux 终端显示 Git 当前所在分支

在Mac、Linux 终端显示 Git 当前所在分支

  1. 进入你的home目录
cd ~
  1. 编辑.bashrc文件
@zjyExcelsior
zjyExcelsior / tmux-cheatsheet.markdown
Created August 26, 2018 17:37 — forked from ryerh/tmux-cheatsheet.markdown
Tmux 快捷键 & 速查表

注意:本文内容适用于 Tmux 2.3 及以上的版本,不计划兼容低版本。

Tmux 快捷键 & 速查表

启动新会话:

tmux [new -s 会话名 -n 窗口名]

恢复会话:

@zjyExcelsior
zjyExcelsior / iterm2-solarized.md
Created March 21, 2018 13:31 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Meslo powerline font + [Powerlevel9k] - (macOS)

Default

Default

Powerlevel9k

Powerlevel9k

@zjyExcelsior
zjyExcelsior / gist:482d290e7b62c904cdf8f545c2e119e2
Created March 6, 2018 05:59 — forked from tkaemming/gist:5640332
documentation on _threading_local
Help on module _threading_local:
NAME
_threading_local - Thread-local objects.
FILE
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/_threading_local.py
MODULE DOCS
http://docs.python.org/library/_threading_local
@zjyExcelsior
zjyExcelsior / tmux-cheatsheet.markdown
Created December 28, 2017 03:26 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@zjyExcelsior
zjyExcelsior / LICENCE SUBLIME TEXT
Created November 14, 2017 02:56
Sublime Text 3 Serial key build is 3143
## Sublime Text 3 Serial key build is 3103
—– BEGIN LICENSE —–
Michael Barnes
Single User License
EA7E-821385
8A353C41 872A0D5C DF9B2950 AFF6F667
C458EA6D 8EA3C286 98D1D650 131A97AB
AA919AEC EF20E143 B361B1E7 4C8B7F04
B085E65E 2F5F5360 8489D422 FB8FC1AA
@zjyExcelsior
zjyExcelsior / sublime_imfix.c
Created September 16, 2016 14:54
fix the Chinese input in Sublime Text in Ubuntu
/*
sublime-imfix.c
Use LD_PRELOAD to interpose some function to fix sublime input method support for linux.
By Cjacker Huang <jianzhong.huang at i-soft.com.cn>
gcc -shared -o libsublime-imfix.so sublime_imfix.c `pkg-config --libs --cflags gtk+-2.0` -fPIC
LD_PRELOAD=./libsublime-imfix.so sublime_text
*/
#include <gtk/gtk.h>
#include <gdk/gdkx.h>
@zjyExcelsior
zjyExcelsior / u_can_u_up.py
Created July 20, 2016 15:48
`UCloud`活动 -> `UCanUup`
# coding: utf-8
import requests
URL = '''http://106.75.28.160/UCloud.txt#rd?sukey=3997c0719f1515206fcb3e208377fb04c629d5538daaa1eb8062a8dd668ceb37a14e5b49042e5f785681b5d06d1cbc61'''
def count_this(word_to_find):
r = requests.get(URL)
return r.content.count(word_to_find)
@zjyExcelsior
zjyExcelsior / switch.py
Last active May 11, 2016 08:04
A replacement method for switch statement in Python
# coding: utf-8
def switch(item):
return {
'one': 1,
'two': 2,
'three': 3
}.get(item, 0)
if __name__ == '__main__':
print switch('one')