Skip to content

Instantly share code, notes, and snippets.

Avatar

hiepxanh hiepxanh

View GitHub Profile
@hiepxanh
hiepxanh / cloudSettings
Last active Jan 19, 2021
Sync Hiep MOON
View cloudSettings
{"lastUpload":"2021-01-19T13:31:01.238Z","extensionVersion":"v3.4.3"}
View gist:f6ff05cf6c549be078f2e2ec6a7fbebe
<div class="popup-sub-advance" [formGroup]="subAdvanceForm">
<div class="popup-title">
Bookable Bussiness
<div class="popup-content">
In order to use <span class="text-bold">Book Bussiness</span>, you agree to pay the <span
class="text-bold">monthly</span> subscription fee of:
<div class="popup-price">
@hiepxanh
hiepxanh / example width
Created Jun 28, 2020
EPSON RECEIPT PRINTER XML EXAMPLE
View example width
<epos-print xmlns="http://www.epson-pos.com/schemas/2011/03/epos-print">
<page>
<feed line="1"/>
<line x1="0" y1="30" x2="575" y2="30" style="thin"/>
<text>Single: Thin&#10;</text>
<feed line="1"/>
<line x1="0" y1="90" x2="575" y2="90" style="medium"/>
<text>Single: Medium&#10;</text>
<feed line="1"/>
<line x1="0" y1="150" x2="575" y2="150" style="thick"/>
View gist:25578459423f5ac40d2a3e6ef8ea2e8f
<epos-print xmlns="http://www.epson-pos.com/schemas/2011/03/epos-print">
<text>Hello world &#10;</text>
<text>Hello&#10;</text>
<text>Hello&#10;</text>
<text>Hello&#10;</text>
<feed line="3"/>
<feed line="3"/>
<cut type="feed"/>
</epos-print>
@hiepxanh
hiepxanh / fix-autofill-chrome.ts
Created Aug 6, 2019
Fix Auto Fill Chrome with Angular 8 and Ionic 4
View fix-autofill-chrome.ts
// <ion-input (change)="fixAutoFill($event, 'password')" #passwordInput autocomplete="off" formControlName="password" type="password"></ion-input>
// <ion-input (change)="fixAutoFill($event, 'username')" #usernameInput autocomplete="off" type="text" formControlName="username"></ion-input>
fixAutoFill(event, type) {
const value = event.target.value;
if (type === 'username') {
this.loginForm.patchValue({
username: value
}, {emitEvent: true, onlySelf: false});
@hiepxanh
hiepxanh / vscodeOpenFolder.reg
Created Jul 27, 2019
Visual Studio Code (VSCode) open Folder as Visual Code Project
View vscodeOpenFolder.reg
Windows Registry Editor Version 5.00
; Open files
[HKEY_CLASSES_ROOT\*\shell\Open with VS Code]
@="Edit with VS Code"
"Icon"="C:\\Users\\hiepx\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe,0"
[HKEY_CLASSES_ROOT\*\shell\Open with VS Code\command]
@="\"C:\\Users\\hiepx\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe\" \"%1\""
; This will make it appear when you right click ON a folder
; The "Icon" line can be removed if you don't want the icon to appear
[HKEY_CLASSES_ROOT\Directory\shell\vscode]
View check-element-inside.ts
// from here:
// @HostListener('document:click', ['$event'])
// clickout(event) {
// console.log("target?",event.target);
// if(this.eRef.nativeElement.contains(event.target)) {
// console.log("clicked inside",event);
// } else {
// console.log("clicked outside",event);
@hiepxanh
hiepxanh / app.component.ts
Created Jul 16, 2018
firebase clould message
View app.component.ts
import { Component } from '@angular/core';
import { Platform } from 'ionic-angular';
import { StatusBar } from '@ionic-native/status-bar';
import { SplashScreen } from '@ionic-native/splash-screen';
import { TabsPage } from '../pages/tabs/tabs';
import { FCM } from '@ionic-native/fcm';
import { ApiProvider } from '../providers/api/api';
@Component({
View demo_product.json
{ "products": [ { "id": 1011873625, "title": "Garlic Bread", "featured_image": "//product.hstatic.net/1000259614/product/upload_b585232256ae43f9bb79be0437d6e165_large.jpg", "handle": "garlic-bread", "compare_at_price": 16000000, "compare_at_price_format": "160,000₫", "price": 14000000, "price_format": "140,000₫", "available": true, "sale": "-13%" } , { "id": 1011828140, "title": "PEPPER SPAGHETTI", "featured_image": "//product.hstatic.net/1000259614/product/upload_b16978af13134090bac7d2bb1bf187f1_large.jpg", "handle": "pepper-spaghetti", "compare_at_price": 0, "compare_at_price_format": "0₫", "price": 15000000, "price_format": "150,000₫", "available": true, "sale": "-0%" } , { "id": 1011873657, "title": "Salmon Salad", "featured_image": "//product.hstatic.net/1000259614/product/garden-salad_large.png", "handle": "salmon-salad", "compare_at_price": 18000000, "compare_at_price_format": "180,000₫", "price": 15700000, "price_format": "157,000₫", "available": true, "sale": "-13%" } , { "id": 1011828057, "title": "
@hiepxanh
hiepxanh / myDemo.json
Last active Jun 28, 2018
myDemo.json
View myDemo.json
[
{
"content": [
{
"name": "logo",
"title": "Logo",
"type": "file",
"value": "https://theme.hstatic.net/1000278055/1000356434/14/logo.png?v=1653",
"href": "#123"