Skip to content

Instantly share code, notes, and snippets.

VueJS Quick notes

2 core features of Vue: Declarative Rendering:

  • Vue extends standard HTML with a template syntax that allows us to declaratively describe HTML output based on JavaScript state. Reactivity:
  • Vue automatically tracks JavaScript state changes and efficiently updates the DOM when changes happen.

**API Reference: ** https://vuejs.org/api

Commit Message Guidelines

Short (72 chars or less) summary

More detailed explanatory text. Wrap it to 72 characters. The blank
line separating the summary from the body is critical (unless you omit
the body entirely).

Write your commit message in the imperative: "Fix bug" and not "Fixed
bug" or "Fixes bug." This convention matches up with commit messages

NVM (Node Version Manager)Mac OS Installation

NVM home

NVM Installation

Install

$ sudo curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash

Set up path

Input below script into .bash_profile NOTE If you installed zshell, you should input below script into .zshrc

@gerlie-reyes
gerlie-reyes / Web Developer Setup of MacOS.md
Last active July 5, 2023 03:47
Latest Mac OS Ventura 13.4 setup for developers

System Preferences

Enable tap to click

System Preferences > Trackpad > (Enable) Tap to click

Turn on Firewall

System Preferences > Privacy & Security > Network > Firewall > Turn On Firewall

Only Allow App Store and Identified Developer Apps

System Preferences > Privacy & Security > Allow apps downloaded from > (Choose) "App Store and identified developers"

Install the following extensions

  • Live Server - Run server for static - live reloading on file saved
  • ES7 React/Redux/GraphQL/React-Native Snippets - provides snippets for javascript ES6 and React development
  • Prettier - code formatter
  • Git Lens - visualized use of git, with overview of who did changes, etc.
  • Auto Rename Tag - To automatically rename the closing tag when changed the opening tag
  • Bracket Pair Colorizer - To easily see the opening and closing of the brackets and braces by color matching
    • The extension is now deprecated because VSCode has native settings for this already Settings > Editor > Bracket Pair Colorization > Enabled > Set to true

Setting up multiple Github accounts in one machine

When you are working in separate accounts, 1 for work-related and 1 for personal, you might encounter permission denied error, for example, saying that your work account is not allowed to push commit to your personal repo. On this config, I am using default github.com for work and then github.com-personal for personal account.

Create 2 Separate SSH Keys

$ cd ~/.ssh
$ ssh-keygen -t rsa -b 4096 -C "your_personal_email@domain.com"
  # save as id_rsa_personal
$ ssh-keygen -t rsa -b 4096 -C "your_work_email@domain.com"

Steps to rename local and remote branch for backup before creating same branch from master

  1. Switch to local branch you want to rename
$ git checkout <branch> 
  1. Rename local branch
$ git branch -m  
@gerlie-reyes
gerlie-reyes / zsh git commonly used.md
Last active August 10, 2020 05:36
Zsh Git Cheatsheet

zsh Git Cheatsheet

Left-Aligned Center Aligned
gcm git checkout master
gcd git checkout develop
gco git checkout
gcb git checkout -b
gl git pull
g git
@gerlie-reyes
gerlie-reyes / Fix conflict when merging
Last active July 14, 2020 07:52
Mostly Used Git Commands
- git checkout <dest branch>
- git pull
- git checkout <feature branch>
- git pull origin <dest branch.
- fix conflicts
- git add <filenames>
- git commit -m "Fix merge conflicts"
- git push
@gerlie-reyes
gerlie-reyes / Save Laptop Energy - Catalina.md
Created July 6, 2020 10:01
Macbook Pro Maintenance Notes
  • System Preferences > Bluetooth > Advance
    • Uncheck - Allow this computer to wake this computer
  • System Preferences > Energy Saver
    • Turn display off after 3 to 5 mins
    • Uncheck - Enable power nap on battery power
  • Reset MSC -- reset laptop to default like a fresh buy laptop
    • Shutdown
  • Left Ctrl + Left Option + Left Shift + Hold down power buton for 7 mins