This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| \documentclass[$if(fontsize)$$fontsize$,$endif$$if(lang)$$lang$,$endif$$if(papersize)$$papersize$,$endif$$for(classoption)$$classoption$$sep$,$endfor$]{$documentclass$} | |
| \usepackage{geometry} % 設定邊界 | |
| \geometry{ | |
| top=1in, | |
| inner=1in, | |
| outer=1in, | |
| bottom=1in, | |
| headheight=3ex, | |
| headsep=2ex | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| \documentclass[$if(fontsize)$$fontsize$,$endif$$if(lang)$$lang$,$endif$$if(papersize)$$papersize$,$endif$$for(classoption)$$classoption$$sep$,$endfor$]{$documentclass$} | |
| \XeTeXlinebreaklocale "zh" | |
| \XeTeXlinebreakskip = 0pt plus 1pt | |
| \usepackage{titlesec} | |
| \titleformat{\section}{\LARGE\filcenter}{}{1em}{} | |
| \titleformat{\subsection}{\Large\filcenter}{}{1em}{} | |
| \usepackage[T1]{fontenc} | |
| \usepackage{lmodern} | |
| \usepackage{amssymb,amsmath} | |
| \usepackage{ifxetex,ifluatex} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ssh -i id_file | |
| ssh -p port | |
| when port is not standard 22 | |
| scp -P port | |
| -P for port is not standard 22 | |
| sftp -oIdentityFile=id_rsa | |
| to feed the identity file | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| https://github.com/junegunn/myvim | |
| https://github.com/junegunn/dotfiles | |
| https://web.archive.org/web/20120630181124/http://www.mohdshakir.net/2007/12/27/enable-vim-code-python-auto-complete | |
| https://github.com/rkulla/pydiction | |
| https://github.com/maxboisvert/vim-simple-complete/blob/master/plugin/vim-simple-complete.vim |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| vim function to use <TAB> as auto complete trigger, | |
| function! InsertTabWrapper() | |
| let col = col(".") - 1 | |
| if !col || getline(".")[col - 1] !~ '\k' | |
| return "\<tab>" | |
| else | |
| return "\<c-n" | |
| endfunction |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Show difference between commits | |
| # Usage: gdiff -n 1 <filename> | |
| usage() { | |
| echo "Usage: $0 -n|--commits num <filename>" | |
| echo " Show git difference between <num> commits " | |
| exit 1 | |
| } | |
| ARGV=`getopt -a -o n: -l commits: -- "$@"` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| https://docs.microsoft.com/en-us/outlook/rest/python-tutorial |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| import base64 | |
| import sys | |
| import unittest | |
| PY3 = sys.version_info[0] >= 3 | |
| def base64ify(bytes_or_str): | |
| if PY3 and isinstance(bytes_or_str, str): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| import argparse | |
| import base64 | |
| def encode(key, string): | |
| encoded_chars = [] | |
| for i in xrange(len(string)): | |
| key_c = key[i % len(key)] | |
| encoded_c = chr(ord(string[i]) + ord(key_c) % 256) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| # -*- coding: utf-8 -*- | |
| import asyncio | |
| import aiohttp | |
| import async_timeout | |
| URLs = [ | |
| 'https://aiohttp.readthedocs.org/', | |
| 'https://www.baidu.com/', |