Skip to content

Instantly share code, notes, and snippets.

View hoangbits's full-sized avatar
🏝️
Working from earth

Le Gia Hoang hoangbits

🏝️
Working from earth
View GitHub Profile
https://udacity.github.io/frontend-nanodegree-styleguide/css.html#type-selectors
https://udacity.github.io/frontend-nanodegree-styleguide/javascript.html
@hoangbits
hoangbits / index.html
Last active July 31, 2017 04:12
css box-sizing
<!DOCTYPE html>
<html>
<head>
<link rel='stylesheet' type='text/css' href='style.css'>
</head>
<body>
<h1 class="title">My App </h1>
<div class="app">

SHORTCUTS

Key/Command Description
Tab Auto-complete files and folder names
Ctrl + A Go to the beginning of the line you are currently typing on
Ctrl + E Go to the end of the line you are currently typing on
Ctrl + U Clear the line before the cursor
Ctrl + K Clear the line after the cursor
Ctrl + W Delete the word before the cursor
Ctrl + T Swap the last two characters before the cursor
@hoangbits
hoangbits / git shortcut
Last active August 24, 2017 06:53
source ~/.bash_profile
# ----------------------
# Git Aliases
# ----------------------
alias ga='git add'
alias gaa='git add .'
alias gaaa='git add --all'
alias gau='git add --update'
alias gb='git branch'
alias gbd='git branch --delete '
alias gc='git commit'
@hoangbits
hoangbits / component.html
Created August 15, 2017 08:51
form validate
<div class="container" fxLayout="row" fxLayout.sm="column" fxLayout.xs="column" fxLayoutAlign.gt-md="space-around-center"
fxLayoutGap="10px" fxLayoutGap.xs="0">
<div fxFlex="40" *ngIf="dish">
<md-card>
<md-card-header>
<md-card-title>
<h3>{{dish.name | uppercase}}</h3>
</md-card-title>
</md-card-header>
<img md-card-image src="{{dish.image}}" alt="{{dish.name}}">
@hoangbits
hoangbits / extensions.json
Last active November 8, 2017 05:44
VSCode's Settings - Syncing
[
{
"name": "code-settings-sync",
"publisher": "Shan",
"version": "2.8.5",
"id": "Shan.code-settings-sync",
"__metadata": {
"id": "e337c67b-55c2-4fef-8949-eb260e7fb7fd",
"publisherId": "ac3a3342-db76-40ef-9277-4657632d3bfe",
"publisherDisplayName": "Shan Khan"
@hoangbits
hoangbits / sg
Created October 3, 2017 09:06
FindJobs
TechinAsia
Wantedly
InternSG
Glints
Recruit.Net
e27
Google
https://github.com/hugo53/awesome-RemoteWork
@hoangbits
hoangbits / sequelize transaction await
Last active September 22, 2020 00:42
using await with transaction in sequelize ORM
// get transaction
const transaction = await sequelize.transaction();
try {
// step 1
await Model.destroy({where: {id}}, {transaction});
// step 2
await Model.create({}, {transaction});
// commit
@hoangbits
hoangbits / changes
Created March 3, 2018 03:16
note bug 1109
remove:
[(ngModel)]="product.unit"
[(ngModel)]="product.shortDesc"
[(ngModel)]="product.currency"
chagnes in .ts file:
this.product.unit -> this.fg.controls['unit'].value)
this.product.shortDesc -> this.fg.controls['shortDesc'].value
this.product.currency -> this.fg.controls['currency'].value
'use strict';
var models = require('../models');
const WorkOrder = models.fm_work_order;
const WorkOrderDetail = models.fm_work_order_detail;
const Sequence = models.md_sequence;
var Vehicle = models.fm_vehicle;
var Company = models.md_company;
var Branch = models.fn_branch;
const WorkOrderType = models.fm_workordertype;
var Schedule = models.fm_vehicle_schedule;