Skip to content

Instantly share code, notes, and snippets.

View ngohungphuc's full-sized avatar
🏡
Sài Gòn & Lelystad

Tony Ngo ngohungphuc

🏡
Sài Gòn & Lelystad
View GitHub Profile
### Keybase proof
I hereby claim:
* I am ngohungphuc on github.
* I am ngohungphuc (https://keybase.io/ngohungphuc) on keybase.
* I have a public key ASBmuVoaAY0YSWZO0pTgsk8lLuPVxM1B1DNlg-wQ4v2iXgo
To claim this, I am signing this object:
@ngohungphuc
ngohungphuc / cloudSettings
Last active February 4, 2021 06:55
Visual Studio Code Settings Sync Gist
{"lastUpload":"2021-02-04T06:56:14.954Z","extensionVersion":"v3.4.3"}
var fs = require("fs");
var minify = require("html-minifier").minify;
var filePath = "dist/index.html";
fs.readFile(filePath, function (err, buf) {
if (err) {
console.log(err);
} else {
var originalValue = buf.toString();
{"lastUpload":"2020-11-30T13:15:04.206Z","extensionVersion":"v3.4.3"}
import { HttpClient, HttpClientModule } from "@angular/common/http";
import {
TranslateLoader,
TranslateModule,
TranslateService
} from "@ngx-translate/core";
import { TranslateHttpLoader } from "@ngx-translate/http-loader";
import { SharedModule } from "@shared/shared.module";
trigger:
- master
pool:
vmImage: 'windows-2019'
steps:
- script: |
git config --global core.longpaths true
git config --global user.email "your email"
git config --global user.name "your github user name"
// devtool.ts
import { StoreDevtoolsModule } from "@ngrx/store-devtools";
export const StoreDevModules = [
StoreDevtoolsModule.instrument({
name: "Online book store"
})
];
"lint-step": {
"*.scss": [
"stylelint src/**/*.scss"
],
"*.{ts,jsx}": [
"ng lint"
]
},
"husky": {
"hooks": {
"husky": {
"hooks": {
"pre-commit": "ng lint && ng build --prod"
}
},
initService() {
const conn = (navigator as any).connection;
if (conn) {
if (conn.saveData) {
// do something
}
const connectionlist = ["slow-2g", "2g", "3g", "4g"];
const effectiveType = conn.effectiveType;
console.log(effectiveType);
}