Skip to content

Instantly share code, notes, and snippets.

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

Minh Luc Van minhlucvan

🏠
Working from home
View GitHub Profile
@minhlucvan
minhlucvan / vscode_shortcuts.md
Created October 17, 2022 15:14 — forked from bradtraversy/vscode_shortcuts.md
Helpful shortcuts for VSCode

VSCode Shortcuts

List of helpful shortcuts for faster coding

If you have any other helpful shortcuts, feel free to add in the comments of this gist :)

Official List of all commands

@minhlucvan
minhlucvan / erc20_one_file
Created April 18, 2022 17:07 — forked from AndreiD/erc20_one_file
ERC20 Token One File
// File: @openzeppelin/contracts/GSN/Context.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.7.5;
/*
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
http://www.oreilly.com/data/free/files/2014-data-science-salary-survey.pdf
http://www.oreilly.com/data/free/files/2015-data-science-salary-survey.pdf
http://www.oreilly.com/data/free/files/Data_Analytics_in_Sports.pdf
http://www.oreilly.com/data/free/files/advancing-procurement-analytics.pdf
http://www.oreilly.com/data/free/files/ai-and-medicine.pdf
http://www.oreilly.com/data/free/files/analyzing-data-in-the-internet-of-things.pdf
http://www.oreilly.com/data/free/files/analyzing-the-analyzers.pdf
http://www.oreilly.com/data/free/files/architecting-data-lakes.pdf
http://www.oreilly.com/data/free/files/being-a-data-skeptic.pdf
http://www.oreilly.com/data/free/files/big-data-analytics-emerging-architecture.pdf
@minhlucvan
minhlucvan / ConvertVie.js
Created May 11, 2020 04:08 — forked from hu2di/ConvertVie.js
JavaScript: Chuyển tiếng Việt có dấu sang không dấu
function change_alias(alias) {
var str = alias;
str = str.toLowerCase();
str = str.replace(/à|á|||ã|â||||||ă|||||/g,"a");
str = str.replace(/è|é||||ê||ế|||/g,"e");
str = str.replace(/ì|í|||ĩ/g,"i");
str = str.replace(/ò|ó|||õ|ô||||||ơ|||||/g,"o");
str = str.replace(/ù|ú|||ũ|ư|||||/g,"u");
str = str.replace(/|ý|||/g,"y");
str = str.replace(/đ/g,"d");
@minhlucvan
minhlucvan / dom-to-json.js
Created May 25, 2018 12:06 — forked from sstur/dom-to-json.js
Stringify DOM nodes using JSON (and revive again)
function toJSON(node) {
node = node || this;
var obj = {
nodeType: node.nodeType
};
if (node.tagName) {
obj.tagName = node.tagName.toLowerCase();
} else
if (node.nodeName) {
obj.nodeName = node.nodeName;
@minhlucvan
minhlucvan / multlin.py
Created April 11, 2018 01:10 — forked from marcelcaraciolo/multlin.py
multivariate linear regression
from numpy import loadtxt, zeros, ones, array, linspace, logspace, mean, std, arange
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt
from pylab import plot, show, xlabel, ylabel
#Evaluate the linear regression
def feature_normalize(X):
'''
Returns a normalized version of X where
import { Component, Input, OnChanges, SimpleChanges, SimpleChange } from '@angular/core';
declare class TypedChange<T = any> extends SimpleChange {
previousValue: T;
currentValue: T;
firstChange: boolean;
constructor(previousValue: T, currentValue: T, firstChange: boolean);
/**
* Check whether the new value is the first value assigned.
*/
@minhlucvan
minhlucvan / app-routing.module.ts
Created December 29, 2017 02:16
Angular2 - Keycloak
import {NgModule} from '@angular/core';
import {RouterModule, Routes} from '@angular/router';
import {AuthGuard} from './shared/services/auth.guard';
import {HomeComponent} from './home/home.component';
export const routes: Routes = [
{
path: ':realm', canActivate: [AuthGuard],
children: [
{path: '', redirectTo: 'home', pathMatch: 'full'},
@minhlucvan
minhlucvan / HandlerA.js
Created July 25, 2017 19:03 — forked from zkilgore/HandlerA.js
Example of how to use React TransitionGroup and react-router
module.exports = React.createClass({
componentWillEnter(cb) {
doSomeAsyncAnimationStuff(function() {
cb();
});
},
componentDidEnter() {
// Called after cb arg from componentWillEnter is called