sudo apt update
sudo apt dist-upgrade && sudo apt autoremove && sudo apt autoclean
- Installing
- remove unnecessary apps
- update ubuntu
- ubuntu-restricted-extras (when you forgot installing extra softwares)
- install my recommand softwares
- install language pack
- install & configure oh-my-zsh
- install nerd fonts (better than powerline fonts in terminal)
- install powerline fonts (if you don't want to install nerd fonts)
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 _ from 'lodash'; | |
export function cloneState(stateValue, path) { | |
const value = path ? _.get(stateValue, path) : stateValue; | |
if (!value) { | |
return value; | |
} | |
return JSON.parse(JSON.stringify(value)); | |
} |
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 { atom, AtomEffect, AtomOptions, DefaultValue } from 'recoil'; | |
export const localStorageEffect = | |
(key: string): AtomEffect<any> => | |
({ setSelf, onSet }) => { | |
const savedValue = localStorage.getItem(key); | |
if (savedValue != null) { | |
setSelf(JSON.parse(savedValue)); | |
} |
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
which hyper | |
# /usr/local/bin/hyper | |
sudo update-alternatives --install /usr/bin/x-terminal-emulator x-terminal-emulator /usr/local/bin/hyper 0 | |
sudo update-alternatives --set x-terminal-emulator /usr/local/bin/hyper |
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
ssh-keygen -m PEM -t rsa -b 4096 -f ./keyFileName -C "[email protected]" |
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 ReactPage(props) { | |
const printingTarget = useRef(null); | |
const iframe4print = useRef(null); | |
function onPrintButtonClick() { | |
let content = printingTarget.current; | |
let pri = iframe4print.current.contentWindow; | |
pri.document.open(); | |
pri.document.write(`<html lang="ko">${document.head.innerHTML}<body>${content.innerHTML}</body></html>`); | |
pri.document.close(); |
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
#!/bin/bash | |
backend_path="/home/username/project/admin/my-project-backend" | |
frontend_path="/home/username/project/admin/my-project-frontend" | |
terminator --working-directory=$backend_path -T ADMIN_BACKEND && | |
until wmctrl -l | grep -q "ADMIN_BACKEND"; | |
do | |
sleep 0.1 | |
done | |
wmctrl -r ADMIN_BACKEND -t 2 |
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
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment | |
class TestClass { | |
constructor({a = 1, b = 2, c, d, ...extra} = {d: 4}) { | |
this.data = {a, b, c, d}; | |
this.extra = extra; | |
} | |
toString() { | |
console.log(`a = ${this.data.a}, b = ${this.data.b}, c = ${this.data.c}, d = ${this.data.d}, extra = ${this.extra}`) | |
} |
NewerOlder