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
  • Thanh Hoa, Vietnam
  • 12:44 (UTC +07:00)
View GitHub Profile
@hoangbits
hoangbits / Fibonancci.py
Created January 9, 2020 05:38
a let b move forward first
def sum_two_numbers(a, b):
return a + b # return result to the function caller
c = sum_two_numbers(3, 12) # assign result of function execution to variable 'c'
def fib(n):
"""This is documentation string for function. It'll be available by fib.__doc__()
Return a list containing the Fibonacci series up to n."""
import { Component, OnInit } from '@angular/core';
import { AgRendererComponent } from "ag-grid-angular/main";
import { ICellRendererParams } from "ag-grid-community";
@Component({
selector: 'app-ag-grid-material-checkbox-cell',
template: `<mat-checkbox (change)="toggleSelection($event)"></mat-checkbox>`
})
export class AgGridMaterialCheckboxCellComponent implements OnInit, AgRendererComponent {
private params: ICellRendererParams;

Keybase proof

I hereby claim:

  • I am legiahoang on github.
  • I am legiahoang (https://keybase.io/legiahoang) on keybase.
  • I have a public key ASAstFepVJ2jLmR9J3od6rNDYW-7ghFpzQCvZLUDDSaooQo

To claim this, I am signing this object:

@hoangbits
hoangbits / hotelListFeed.xml
Created January 30, 2019 02:53
hotel-list-feed
<?xml version="1.0" encoding="UTF-8"?>
<listings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://www.gstatic.com/localfeed/local_feed.xsd">
<language>jp</language>
<listing>
<id>25107</id>
<name>カンデオホテルズ大阪なんば</name>
<address format="simple">
<component name="addr1">中央区東心斎橋2-2-5</component>
<component name="city">大阪市</component>
'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;
@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
@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 / sg
Created October 3, 2017 09:06
FindJobs
TechinAsia
Wantedly
InternSG
Glints
Recruit.Net
e27
Google
https://github.com/hugo53/awesome-RemoteWork
@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 / 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}}">