James Sugrue [asked][1], "@GitHubAPI is there a way to find the number of stars for a given repository?"
$ curl -ni "https://api.github.com/search/repositories?q=more+useful+keyboard" -H 'Accept: application/vnd.github.preview'
{| " File: .vim/syntax/rdoc.vim | |
| " RDoc inline links: protocol optional user:pass@ sub/domain .com, .co.uk, etc optional port path/querystring/hash fragment | |
| " ------------ _____________________ --------------------------- ________________________ ----------------- __ | |
| syntax match rdocInlineURL /https\?:\/\/\(\w\+\(:\w\+\)\?@\)\?\([A-Za-z][-_0-9A-Za-z]*\.\)\{1,}\(\w\{2,}\.\?\)\{1,}\(:[0-9]\{1,5}\)\?\S*/ | |
| HtmlHiLink rdocInlineURL htmlLink |
| "statusline setup | |
| set statusline=%f "tail of the filename | |
| "display a warning if fileformat isnt unix | |
| set statusline+=%#warningmsg# | |
| set statusline+=%{&ff!='unix'?'['.&ff.']':''} | |
| set statusline+=%* | |
| "display a warning if file encoding isnt utf-8 | |
| set statusline+=%#warningmsg# |
| # default.custom.yaml | |
| # save it to: | |
| # ~/.config/ibus/rime (linux) | |
| # ~/Library/Rime (macos) | |
| # %APPDATA%\Rime (windows) | |
| patch: | |
| schema_list: | |
| - schema: luna_pinyin # 朙月拼音 | |
| - schema: luna_pinyin_simp # 朙月拼音 简化字模式 |
| # luna_pinyin.custom.yaml | |
| # save it to: | |
| # ~/.config/ibus/rime (linux) | |
| # ~/Library/Rime (macos) | |
| # %APPDATA%\Rime (windows) | |
| patch: | |
| "key_binder/bindings": | |
| - { when: paging, accept: bracketleft, send: Page_Up } | |
| - { when: has_menu, accept: bracketright, send: Page_Down } |
| #!/bin/bash | |
| # Script for installing tmux on systems where you don't have root access. | |
| # tmux will be installed in $HOME/local/bin. | |
| # It's assumed that wget and a C/C++ compiler are installed. | |
| # exit on error | |
| set -e | |
| TMUX_VERSION=1.8 |
| # snippet is placed into public domain by | |
| # anatoly techtonik <[email protected]> | |
| # http://stackoverflow.com/questions/8151300/ignore-case-in-glob-on-linux | |
| import fnmatch | |
| import os | |
| import re | |
| def findfiles(which, where='.'): |
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| def fun(x): | |
| #This is where all the info on the function goes | |
| if x < 28: | |
| return 100000*x - 2721000 | |
| else: | |
| return 79000 |
If you use git on the command-line, you'll eventually find yourself wanting aliases for your most commonly-used commands. It's incredibly useful to be able to explore your repos with only a few keystrokes that eventually get hardcoded into muscle memory.
Some people don't add aliases because they don't want to have to adjust to not having them on a remote server. Personally, I find that having aliases doesn't mean I that forget the underlying commands, and aliases provide such a massive improvement to my workflow that it would be crazy not to have them.
The simplest way to add an alias for a specific git command is to use a standard bash alias.
# .bashrc| // | |
| // _oo0oo_ | |
| // o8888888o | |
| // 88" . "88 | |
| // (| -_- |) | |
| // 0\ = /0 | |
| // ___/`---'\___ | |
| // .' \\| |// '. | |
| // / \\||| : |||// \ | |
| // / _||||| -:- |||||- \ |