Skip to content

Instantly share code, notes, and snippets.

View CharlieYe0205's full-sized avatar

CharlieYe0205

View GitHub Profile
@CharlieYe0205
CharlieYe0205 / git_fun.md
Last active July 12, 2020 01:02
Git Fun

print git command results to stdout

git config --global core.pager "less -FRSX"

fix mac os upgrade issue

sudo xcode-select --install
@CharlieYe0205
CharlieYe0205 / npm_fun.md
Last active September 11, 2019 05:55
Npm Fun

assign port: create a .env file in the porject directory

PORT=3001

How to reference a scss files installed to node_modules?

@import '~@material/react-button/index.scss';
@CharlieYe0205
CharlieYe0205 / deploy_react_with_nginx.md
Last active May 1, 2022 03:51
Deploy React with Nginx
curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -
sudo apt-get install -y nodejs build-essential libpng-dev python2
node --version

curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt update
sudo apt install -y yarn
@CharlieYe0205
CharlieYe0205 / launch_item2_on_login.md
Created December 29, 2019 22:22
Launch Item2 on Login
  1. lauch item 2
  2. close all current tabs
  3. cmd-shift-s to save a window arrangement
  4. item2 -> prefs -> arrangements to make it default
  5. item2 -> pref -> general to have it open the default window arrangement at startup
  6. Add item2 to login item and hide it
Happy Coding ^_^
@CharlieYe0205
CharlieYe0205 / ubuntu_18_04_fun.md
Last active May 1, 2022 12:11
Ubuntu 18.04 Fun

E: Encountered a section with no Package: header

gunzip /var/backups/dpkg.status.1.gz
sudo gunzip /var/backups/dpkg.status.1.gz
head /var/backups/dpkg.status.1
sudo cp /var/backups/dpkg.status.1 /var/lib/dpkg/status
sudo apt-get update

invalid value for parameter "lc_monetary": "en_US.UTF-8"