An introduction to curl using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
| # 0 is too far from ` ;) | |
| set -g base-index 1 | |
| # Automatically set window title | |
| set-window-option -g automatic-rename on | |
| set-option -g set-titles on | |
| #set -g default-terminal screen-256color | |
| set -g status-keys vi | |
| set -g history-limit 10000 |
An introduction to curl using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
| " JSDoc形式のコメントを追加(functionの行で実行する) | |
| " hogeFunc: function() の形式と function hogeFunc() に対応 | |
| " 関数定義でない場合は、コメントだけ出力する | |
| function! AddJSDoc() | |
| let l:jsDocregex = '\s*\([a-zA-Z]*\)\s*[:=]\s*function\s*(\s*\(.*\)\s*).*' | |
| let l:jsDocregex2 = '\s*function \([a-zA-Z]*\)\s*(\s*\(.*\)\s*).*' | |
| let l:line = getline('.') | |
| let l:indent = indent('.') | |
| let l:space = repeat(" ", l:indent) |
One can use MD5 or plain text diff to see differences in PDF files. If that's not enough, here's how to use diff-pdf which knows how to diff based on appearance or words:
brew install diff-pdf~/.gitconfig to add this:[difftool "diffpdf"]
cmd = diff-pdf --view \"$LOCAL\" \"$REMOTE\"
| /* | |
| Calculate FV. | |
| Exact same Excel FV function | |
| Rate is the interest rate per period. | |
| Nper is the total number of payment periods in an annuity. | |
| Pmt is the payment made each period; it cannot change over the life of the annuity. Pmt must be entered as a negative number. | |
| Pv is the present value, or the lump-sum amount that a series of future payments is worth right now. If pv is omitted, it is assumed to be 0 (zero). PV must be entered as a negative number. | |
| Type is the number 0 or 1 and indicates when payments are due. If type is omitted, it is assumed to be 0 which represents at the end of the period. If payments are due at the beginning of the period, type should be 1. | |
| */ |
| " JSDoc形式のコメントを追加(functionの行で実行する) | |
| " hogeFunc: function() の形式と function hogeFunc() に対応 | |
| " 関数定義でない場合は、コメントだけ出力する | |
| function! AddJSDoc() | |
| let l:jsDocregex = '\s*\([a-zA-Z]*\)\s*[:=]\s*function\s*(\s*\(.*\)\s*).*' | |
| let l:jsDocregex2 = '\s*function \([a-zA-Z]*\)\s*(\s*\(.*\)\s*).*' | |
| let l:line = getline('.') | |
| let l:indent = indent('.') | |
| let l:space = repeat(" ", l:indent) |
Let's have some command-line fun with curl, [jq][1], and the [new GitHub Search API][2].
Today we're looking for:
People
:bowtie: |
😄 :smile: |
😆 :laughing: |
|---|---|---|
😊 :blush: |
😃 :smiley: |
:relaxed: |
😏 :smirk: |
😍 :heart_eyes: |
😘 :kissing_heart: |
😚 :kissing_closed_eyes: |
😳 :flushed: |
😌 :relieved: |
😆 :satisfied: |
😁 :grin: |
😉 :wink: |
😜 :stuck_out_tongue_winking_eye: |
😝 :stuck_out_tongue_closed_eyes: |
😀 :grinning: |
😗 :kissing: |
😙 :kissing_smiling_eyes: |
😛 :stuck_out_tongue: |