Update $BROWSER env var
vim ~/.profile
export BROWSER=/usr/bin/google-chrome-stable
Remove mime bindings
| function JsModule() { | |
| const someThing = 'zhanghe'; | |
| const anOther = 'cool'; | |
| function doSomeThing() { | |
| console.log(someThing); | |
| } | |
| function doAnOther() { | |
| console.log(anOther); |
| // Does not work with `new funcA.bind(thisArg, args)` | |
| if (!Function.prototype.bind) (function(){ | |
| var slice = Array.prototype.slice; | |
| Function.prototype.bind = function() { | |
| var thatFunc = this, thatArg = arguments[0]; | |
| var args = slice.call(arguments, 1); | |
| if (typeof thatFunc !== 'function') { | |
| // closest thing possible to the ECMAScript 5 | |
| // internal IsCallable function | |
| throw new TypeError('Function.prototype.bind - ' + |
| function mixin(sourceObj, targetObj) { | |
| for (var key in sourceObj) { | |
| if (!(key in targetObj)) { | |
| targetObj[key] = sourceObj[key]; | |
| } | |
| } | |
| return targetObj; | |
| } |
| function padNumber(number, length) { | |
| return (new Array(length).join('0')+number).slice(-length) | |
| } |
| Array.matrix = function(numrows, numcols, initial) { | |
| var arr = []; | |
| for (var i = 0; i < numrows; i++) { | |
| var columns = []; | |
| for (var j = 0; j < numcols; j++) { | |
| columns[j] = initial; | |
| } | |
| arr[i] = columns; | |
| } | |
| { | |
| "emojis": [ | |
| {"emoji": "👩👩👧👧", "name": "family: woman, woman, girl, girl", "shortname": ":woman_woman_girl_girl:", "unicode": "1F469 200D 1F469 200D 1F467 200D 1F467", "html": "👩‍👩‍👧‍👧", "category": "People & Body (family)", "order": ""}, | |
| {"emoji": "👩👩👧👦", "name": "family: woman, woman, girl, boy", "shortname": ":woman_woman_girl_boy:", "unicode": "1F469 200D 1F469 200D 1F467 200D 1F466", "html": "👩‍👩‍👧‍👦", "category": "People & Body (family)", "order": ""}, | |
| {"emoji": "👩👩👦👦", "name": "family: woman, woman, boy, boy", "shortname": ":woman_woman_boy_boy:", "unicode": "1F469 200D 1F469 200D 1F466 200D 1F466", "html": "👩‍👩‍👦‍👦", "category": "People & Body (family)", "order": ""}, | |
| {"emoji": "👨👩👧👧", "name": "family: man, woman, girl, girl", "shortname": ":man_woman_girl_girl:", "unicode": "1F468 200D 1F469 200D 1F467 200D 1F467", "html": "👨‍👩&z |
Update $BROWSER env var
vim ~/.profile
export BROWSER=/usr/bin/google-chrome-stable
Remove mime bindings
| <article class="forecast"> | |
| <h1>Weather forecast for Seattle</h1> | |
| <article class="day-forecast"> | |
| <h2>03 March 2018</h2> | |
| <p>Rain.</p> | |
| </article> | |
| <article class="day-forecast"> | |
| <h2>04 March 2018</h2> | |
| <p>Periods of rain.</p> | |
| </article> |
| import { useState, ReactNode, useRef, useMemo } from 'react'; | |
| import { Select, Spin } from 'antd'; | |
| import { SelectProps } from 'antd/es/select'; | |
| import debounce from 'lodash/debounce'; | |
| export interface DebounceSelectProps<ValueType = any> | |
| extends Omit<SelectProps<ValueType>, 'options' | 'children'> { | |
| fetchOptions: (search: string) => Promise<ValueType[]>; | |
| debounceTimeout?: number; | |
| defaultOptions?: ValueType[]; |