Skip to content

Instantly share code, notes, and snippets.

View vuongtran's full-sized avatar
🎯
Focusing

Vuong vuongtran

🎯
Focusing
  • Ho Chi Minh City, Vietnam
View GitHub Profile
@vuongtran
vuongtran / gist:767ca14cd78cd10b45de9e291e27924a
Last active September 8, 2020 04:13
Open source eCommerce plaform with morden tech stack
# Plaforms
Shopware - https://github.com/shopware
Saleor - https://github.com/mirumee
Spree - https://github.com/spree
GetCandy - https://github.com/getcandy
Reaction Commerce - https://github.com/reactioncommerce
Vendure - https://github.com/vendure-ecommerce
# Storefront for eCommerce
Vue Storefront - PWA for eCommerce - https://www.vuestorefront.io
@vuongtran
vuongtran / count_duplicate.js
Last active June 6, 2021 22:57
How to count duplicate value in an array in javascript
// #1 Solution
var arr = ['a','b','c','d','d','e','a','b','c','f','g','h','h','h','e','a'];
var map = arr.reduce(function(prev, cur) {
prev[cur] = (prev[cur] || 0) + 1;
return prev;
}, {});
// map is an associative array mapping the elements to their frequency:
document.write(JSON.stringify(map));
// prints {"a": 3, "b": 2, "c": 2, "d": 2, "e": 2, "f": 1, "g": 1, "h": 3}
@vuongtran
vuongtran / loops_in_object.js
Created June 6, 2021 23:04
How to deal with key value pairs in JavaScript object
const test = {a: 1, b: 2, c: 3};
// #1 ES6
for (const [key, value] of Object.entries(test)) {
console.log(key, value);
}
// #2
for (var k in test){
if (test.hasOwnProperty(k)) {
@vuongtran
vuongtran / awesome_tech_job.txt
Last active August 17, 2021 02:38
Awesome Tech Job | Hunting List A collection of awesome places to job hunt for people in tech. Compiled resources for developers
Popular Sites to Job Hunt
AngelList - https://angel.co
GitHub: http://jobs.github.com
Mashable: http://jobs.mashable.com/jobs
Indeed: http://indeed.com
StackOverflow: http://stackoverflow.com/jobs
LinkedIn: http://linkedIn.com
Glassdoor: http://glassdoor.com
Dice: http://dice.com
Monster: http://monster.com