This file contains 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
#!/bin/sh | |
# sudo add-apt-repository ppa:eh5/pulseaudio-a2dp (NOT NEEDED ANYMORE) | |
sudo apt update | |
sudo apt install libldac \ | |
libavcodec-extra58 \ | |
pulseaudio \ | |
pulseaudio-module-bluetooth \ | |
blueman |
This file contains 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
Array.from({ length: 130 }, (_, i) => (i + 2) * 5000).reverse() |
This file contains 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
const formatPrice = ({ | |
price, | |
fraction = 2, | |
currency = 'USD', | |
currencyDisplay = 'symbol', // 'narrowSymbol' is not supported by Safari yet | |
locale = 'en-US', | |
signDisplay = 'auto', | |
...props | |
}) => { | |
if (isNaN(Number(price))) { |
This file contains 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
74925 NONE | |
54706 MIT | |
9268 ISC | |
3050 BSD | |
1521 BSD-2-CLAUSE | |
791 APACHE-2.0 | |
699 APACHE 2.0 | |
392 BSD-3-CLAUSE | |
364 WTFPL | |
346 UNKNOWN |
This file contains 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
git clean -xfd | |
git submodule foreach --recursive git clean -xfd | |
git reset --hard | |
git submodule foreach --recursive git reset --hard | |
git submodule update --init --recursive |
This file contains 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
{ | |
"editor.tabSize": 4, | |
"[javascript]": { | |
"editor.tabSize": 2, | |
"editor.defaultFormatter": "esbenp.prettier-vscode" | |
}, | |
"[javascriptreact]": { | |
"editor.tabSize": 2, | |
"editor.defaultFormatter": "esbenp.prettier-vscode" | |
}, |
This file contains 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
const replaceStrByRender = ( | |
str: string, | |
substr: string | RegExp, | |
render: (part: string, i: number) => JSX.Element | |
) => { | |
if (!str || !substr) return str | |
const parts = str.split(substr) | |
const results: Array<string | JSX.Element | null> = [] | |
let index = 0 | |
for (let i = 0; i < parts.length; i++) { |
This file contains 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
"To include this, run `cat .gitlfstrack | xargs git lfs track`" | |
"*.3ds" | |
"*.3g2" | |
"*.3gp" | |
"*.7z" | |
"*.a" | |
"*.aac" | |
"*.adp" | |
"*.ai" | |
"*.aif" |
This file contains 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
#!/bin/sh | |
# ref: https://devconnected.com/how-to-clean-up-git-branches/ | |
# lists branches that can be deleted/pruned on your local. An option --dry-run is needed | |
git remote prune origin --dry-run | |
# In order to clean up remote tracking branches, | |
# meaning deleting references to non-existing remote branches, | |
# use the “git remote prune” command and specify the remote name | |
git remote prune origin |
This file contains 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
{ | |
"spectrum": { | |
"show": "true", | |
"n-points": "150", | |
"height": "100", | |
"use-custom-color": "true", | |
"fill": "true", | |
"show-bar-border": "true", | |
"scale": "1", | |
"exponent": "1", |