Skip to content

Instantly share code, notes, and snippets.

View andy3520's full-sized avatar
🎯
Focusing

An Nguyen Hieu Duc andy3520

🎯
Focusing
  • Nab Vietnam
  • Ho Chi Minh
View GitHub Profile
@johnsoncodehk
johnsoncodehk / cheapComputed.ts
Last active August 27, 2020 23:16
Vue 3 "cheap" computed
import { computed, ref } from "vue";
import { ComputedGetter, pauseTracking, resetTracking } from "@vue/reactivity";
// if no version, not work for objects/arrays...
export function cheapComputed<T, K = T>(getValue: ComputedGetter<T>, getVersion?: ComputedGetter<K>) {
const value = computed(getValue);
const version = getVersion ? computed(getVersion) : value;
const lastValue = ref<T>();
const lastVersion = ref<K>();
const changed = computed(() => version.value !== lastVersion.value);
@paulnguyen-mn
paulnguyen-mn / reactjs-interview-tips.md
Last active March 7, 2023 12:16
Bí kíp cho buổi phỏng vấn ReactJS thành công 🎉

Bí kíp cho buổi phỏng vấn ReactJS thành công 🎉

From unplash.com

AGENGA:

  1. Một vài lưu ý chung
  2. Ôn tập kiến thức JS/ReactJS
  3. Cày thuật toán, giải thuật
  4. Tìm hiểu về công ty mà mình xin ứng tuyển
@DawidMyslak
DawidMyslak / vue.md
Last active April 22, 2024 12:49
Vue.js and Vuex - best practices for managing your state

Vue.js and Vuex - best practices for managing your state

Modifying state object

Example

If you have to extend an existing object with additional property, always prefer Vue.set() over Object.assign() (or spread operator).

Example below explains implications for different implementations.

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@kn9ts
kn9ts / GPLv3.md
Last active July 3, 2024 08:19
GPLv3 explained

GPL3 LICENSE SYNOPSIS

TL;DR* Here's what the license entails:

1. Anyone can copy, modify and distribute this software.
2. You have to include the license and copyright notice with each and every distribution.
3. You can use this software privately.
4. You can use this software for commercial purposes.
5. If you dare build your business solely from this code, you risk open-sourcing the whole code base.
@FrancesCoronel
FrancesCoronel / sampleREADME.md
Last active March 26, 2024 01:21
A sample README for all your GitHub projects.

Repository Title Goes Here

Frances Coronel

INSERT GRAPHIC HERE (include hyperlink in image)

Subtitle or Short Description Goes Here

ideally one sentence >

@JamesMGreene
JamesMGreene / gitflow-breakdown.md
Last active July 3, 2024 20:30
`git flow` vs. `git`: A comparison of using `git flow` commands versus raw `git` commands.

Initialize

gitflow git
git flow init git init
  git commit --allow-empty -m "Initial commit"
  git checkout -b develop master

Connect to the remote repository