A list of Git aliases & recipes to Git like a 😎.
# ~/.git/config
[alias]
# List all aliases :)
la = "!git config -l | grep alias | cut -c 7-"
-- show running queries (pre 9.2) | |
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
FROM pg_stat_activity | |
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start desc; | |
-- show running queries (9.2) | |
SELECT pid, age(clock_timestamp(), query_start), usename, query | |
FROM pg_stat_activity | |
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
If you are on a Mac, substitute command
for control
. Don't type the + (it means press both keys at once).
Shift
+ Enter
run selected cell or cells - if no cells below, insert a code cell below
Ctrl
+ B
toggle hide/show left sidebar
Ctrl
+ S
save and checkpoint
Ctrl
+ Shift
+ S
save as
The standard way of understanding the HTTP protocol is via the request reply pattern. Each HTTP transaction consists of a finitely bounded HTTP request and a finitely bounded HTTP response.
However it's also possible for both parts of an HTTP 1.1 transaction to stream their possibly infinitely bounded data. The advantages is that the sender can send data that is beyond the sender's memory limit, and the receiver can act on
export const status = { | |
TIMEOUT: 'timeout', | |
SUCCESS: 'success', | |
SKIPPED: 'skipped' | |
}; | |
/** | |
* Load a JS script programmatically. | |
* | |
* The <script> element get inserted as the last child of <body> by default but can be customized |
/** | |
* NestedHistory | |
* ------------- | |
* | |
* TODO: doc | |
* | |
*/ | |
import _ from 'underscore'; |
[alias] | |
co = checkout | |
go = checkout -b | |
st = status | |
pr = pull --rebase | |
br = branch | |
filediff = diff --name-only | |
last = log -1 HEAD | |
fixup = commit --fixup | |
rebase-auto = git rebase --interactive --autosquash |
(function (App) { | |
/** | |
* Do before each Ajax request | |
* --------------------------- | |
* | |
* 1. Disable ajax related DOM controls to prevent double submissions | |
* 2. Extend each XHR object with a couple of methods that let ajax calls skip global handlers on-demand. | |
* | |
*/ |
/** | |
* Pan | |
* --- | |
* | |
* A collection one-finger Pan gesture recognizers. | |
* | |
* A pan is an omnidirectional one- or two-finger gesture that expands the field of view. | |
* Drag is typically used with pan. | |
* | |
*/ |