This is a curated set of conventions and best practices for Stylus, an expressive, dynamic, robust and advanced CSS preprocessor. Frustrated with there not being a set of conventions set in place (that could be easily found), I set forth to find out on my own.
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
How to have some fun using the terminal.
- Install cowsay [0] via :
sudo apt-get install cowsay
- Install fortune [1] via :
sudo apt-get install fortune
- Install figlet [3] via :
sudo apt-get install figlet
- Make sure you have Ruby installed via :
ruby -v
- Install the lolcat [2] via : gem
gem install lolcat
- (option) Add to .bash_profile and/or .bashrc
ๆณจๆ๏ผๆฌๆๅ ๅฎน้็จไบ Tmux 2.3 ๅไปฅไธ็็ๆฌ๏ผไฝๆฏ็ปๅคง้จๅ็็นๆงไฝ็ๆฌไน้ฝ้็จ๏ผ้ผ ๆ ๆฏๆใVI ๆจกๅผใๆไปถ็ฎก็ๅจไฝ็ๆฌๅฏ่ฝไผไธๆฌๆไธๅ ผๅฎนใ
ๅฏๅจๆฐไผ่ฏ๏ผ
tmux [new -s ไผ่ฏๅ -n ็ชๅฃๅ]
ๆขๅคไผ่ฏ๏ผ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { ObjectOmit } from 'typelevel-ts' | |
const get = <O, K extends keyof O>(k: K, o: O): O[K] => o[k] | |
const set = <O, K extends keyof O>(k: K, v: O[K], o: O): O => Object.assign({}, o, { [k as any]: v }) | |
const remove = <O, K extends keyof O>(k: K, o: O): ObjectOmit<O, K> => { | |
const copy: any = Object.assign({}, o) | |
delete copy[k] | |
return copy |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function addComments(arg, name) { | |
// ๅฝๅๆฐๅ็ๆณจ้ไธๅญๅจ็ๆ ๅต, ๅ ๅ ฅ webpackChunkName ๆณจ้ | |
if (!arg.leadingComments) { | |
arg.leadingComments = [ | |
{ | |
type: 'CommentBlock', | |
value: ` webpackChunkName: '${name}' `, | |
}, | |
] | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TypeScript 21 hrs 47 mins โโโโโโโโโโโโโโโโโโโโ 67.1% | |
Vue.js 6 hrs 21 mins โโโโโโโโโโโโโโโโโโโโ 19.6% | |
JSON 2 hrs 10 mins โโโโโโโโโโโโโโโโโโโโ 6.7% | |
JavaScript 46 mins โโโโโโโโโโโโโโโโโโโโ 2.4% |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -Eeuo pipefail | |
trap cleanup SIGINT SIGTERM ERR EXIT | |
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P) | |
usage() { | |
cat <<EOF | |
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...] |
OlderNewer