Skip to content

Instantly share code, notes, and snippets.

View nguyenhuucam91's full-sized avatar
🏠
Working from home

Nguyễn Hữu Cầm nguyenhuucam91

🏠
Working from home
View GitHub Profile
let call;
const once = (config = {}) => {
if (call) {
call.cancel("Only one request allowed at a time.");
}
call = axios.CancelToken.source();
config.cancelToken = call.token
return axios(config);
}
@nguyenhuucam91
nguyenhuucam91 / myplugin.js
Created February 18, 2020 02:38 — forked from leolux/myplugin.js
Object-Oriented jQuery Plugin skeleton
//Source: http://www.virgentech.com/blog/2009/10/building-object-oriented-jquery-plugin.html
//Author: Hector Virgen
//Date: August 23, 2010
(function($) {
var MyPlugin = function(element, options) {
var elem = $(element);
var obj = this;
@nguyenhuucam91
nguyenhuucam91 / gist:305422aeb50b3b4141fa297db4ca07bc
Created December 6, 2019 06:03
Guides Neo4J - Ex1 preparation
MATCH (n) DETACH DELETE n;
CREATE (TheMatrix:Movie {title:'The Matrix', released:1999, tagline:'Welcome to the Real World'})
CREATE (Keanu:Person {name:'Keanu Reeves', born:1964})
CREATE (Carrie:Person {name:'Carrie-Anne Moss', born:1967})
CREATE (Laurence:Person {name:'Laurence Fishburne', born:1961})
CREATE (Hugo:Person {name:'Hugo Weaving', born:1960})
CREATE (LillyW:Person {name:'Lilly Wachowski', born:1967})
CREATE (LanaW:Person {name:'Lana Wachowski', born:1965})
CREATE (JoelS:Person {name:'Joel Silver', born:1952})
CREATE
use petshop
db.pets.insertOne({"name": "Mikey", "species": "Gerbil"});
db.pets.insertOne({"name": "Davey Bungooligan", "species": "Piranha"});
db.pets.insertOne({"name": "Suzy B", "species": "Cat"});
db.pets.insertOne({"name": "Mikey", "species": "Hotdog"});
db.pets.insertOne({"name": "Terrence", "species": "Sausagedog"});
db.pets.insertOne({"name": "Philomena Jones", "species": "Cat"});
@nguyenhuucam91
nguyenhuucam91 / Mongo git terminal
Last active March 12, 2021 03:45
Mongo git terminal
use petshops;
(function() {
var names = [
'Yolanda',
'Iska',
'Malone',
'Frank',
'Foxton',
'Pirate',
'Poppelhoffen',
@nguyenhuucam91
nguyenhuucam91 / Uninstall mysql
Created March 19, 2019 16:22
Uninstall mysql Homebrew
ps -ax | grep mysql
stop and kill any MySQL processes
brew remove mysql
brew cleanup
sudo rm /usr/local/mysql
sudo rm -rf /usr/local/var/mysql
sudo rm -rf /usr/local/mysql*
sudo rm ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
sudo rm -rf /Library/StartupItems/MySQLCOM
sudo rm -rf /Library/PreferencePanes/My*
@nguyenhuucam91
nguyenhuucam91 / MySQL_5-7_macOS.md
Created March 19, 2019 16:19 — forked from robhrt7/MySQL_5-7_macOS.md
Install MySQL 5.7 on macOS using Homebrew

This is a fork of original gist https://gist.github.com/nrollr/3f57fc15ded7dddddcc4e82fe137b58e, with slight changes on pointing to 5.7 version branch, instead of 8 (latest default of MySQL in Hombrew).

Install MySQL 5.7 on macOS

This procedure explains how to install MySQL using Homebrew on macOS (Sierra 10.12 and up)

Install Homebrew

  • Installing Homebrew is effortless, open Terminal and enter :
    $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • Note: Homebrew will download and install Command Line Tools for Xcode 8.0 as part of the installation process.
@nguyenhuucam91
nguyenhuucam91 / cloudSettings
Last active December 22, 2020 15:19
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-12-22T15:19:14.786Z","extensionVersion":"v3.4.3"}
@nguyenhuucam91
nguyenhuucam91 / docker-compose.yml
Last active May 9, 2020 09:50
Cấu hình Docker-compose yml chạy Nginx / Php / Mysql / Redis
version: '2'
services:
web:
container_name: docker-nginx-latest
image: nginx:latest
restart: always
ports:
- "80:80"
volumes:
- ./code:/var/www
@nguyenhuucam91
nguyenhuucam91 / Balsamiq mockups 3.5.15 fullcrack serial
Last active March 19, 2019 16:20
Balsamiq mockups 3.5.15 fullcrack serial
Name: Flash
Serial: eNrzzU/OLi0odswsqnHLSSzOqDGoca7JKCkpsNLXLy8v1ytJTczVLUotKNFLzs8FAJHYETc=
if anyone wants to thank ETH: 0x527c2aB55b744D6167dc981576318af96ed26676
Thank you!