(C-x means ctrl+x, M-x means alt+x)
The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf
:
# 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 |
// === Arrays | |
var [a, b] = [1, 2]; | |
console.log(a, b); | |
//=> 1 2 | |
// Use from functions, only select from pattern | |
var foo = () => [1, 2, 3]; |
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft
, elem.offsetTop
, elem.offsetWidth
, elem.offsetHeight
, elem.offsetParent
#!/bin/bash | |
########################################################################################################################## | |
# This will update plex libraries manually from the command line. # | |
# This will work on centos 7 but I can't make any guarantees about other OSes or platforms. # | |
# If you're running plex on mac os x or windows, get a real OS. # | |
# # | |
# The exports below are important because if you don't have all of them set, you will get no result when you go to list # | |
# ./Plex\ Media\ Scanner --list # | |
# This will show you all of your libraries and their numbers. # |
import PropTypes from 'prop-types'; | |
type Omit<T, K> = Pick<T, Exclude<keyof T, K>>; | |
type Defined<T> = T extends undefined ? never : T; | |
/** | |
* Get the type that represents the props with the defaultProps included. | |
* | |
* Alternatively, we could have done something like this: |
// usage: | |
// create a min heap | |
// const heap = new Heap((a, b) => a.val < b.val) | |
// | |
// create a max heap | |
// const heap = new Heap((a, b) => a.val > b.val) | |
// | |
// insert an item into the heap - O(lgn) | |
// heap.insert(item) | |
// |