Skip to content

Instantly share code, notes, and snippets.

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

Can Ngo ngocongcan

🏠
Working from home
  • Da nang, Vietname
View GitHub Profile
{
"DoiThuNhat": {
"HoTen" : "Ngô Công Đức",
"DoiThuHai":
[
{
"HoTen" : "Ngô Công Mui (Đời thứ 2)",
"DoiThuBa": [
{
"HoTen" : "Ngô Công Mui (Cần) - Đời thứ 3",
@ngocongcan
ngocongcan / base64-typescript-class.ts
Created March 8, 2017 17:41 — forked from Juszczak/base64-typescript-class.ts
TypeScript class for Base64 encoding/decoding
class Base64 {
private PADCHAR: string = '=';
private ALPHA: string = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
private getByte(s: string, i: number): number {
const x = s.charCodeAt(i);
return x;
}
private getByte64(s: string, i: number): number {
// ts
import { Component, Input, Output, EventEmitter} from '@angular/core';
@Component({
selector: 'horizontal-tabs',
templateUrl: 'horizontal-tabs.html'
})
export class HorizontalTabs {
@Input() componentId: string;
@Input() tabMenu: any
public showSelectPopup(carInfo : CarInfo) {
let alert = this.alertCtrl.create();
alert.setTitle(carInfo.selectOptions.title);
carInfo.values.forEach(element => {
alert.addInput({type: 'radio', label: element, value: element});
});
alert.addButton('CANCEL');
alert.addButton({
text: 'OK',
handler: data => {
function cmpVersions (a, b) {
var i, diff;
var regExStrip0 = /(\.0+)+$/;
var segmentsA = a.replace(regExStrip0, '').split('.');
var segmentsB = b.replace(regExStrip0, '').split('.');
var l = Math.min(segmentsA.length, segmentsB.length);
for (i = 0; i < l; i++) {
diff = parseInt(segmentsA[i], 10) - parseInt(segmentsB[i], 10);
if (diff) {
return diff;
# Install homebrew
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
brew doctor
brew install ant
brew install maven
#https://gradle.org/install need to install latest version
brew install gradle 3.5
#brew install android-sdk
@ngocongcan
ngocongcan / getTableContentInEmail.java
Created November 13, 2017 16:28
Get table content in Email
/**
* Get table content in Email
*/
public String[][] getTableContentInEmail(String subjectEmail, int tableNumOrder) throws Exception {
String emailContent = "";
// get table content
// try {
// get table content
emailContent = getMessages(subjectEmail);
#!/bin/bash
# Uninstall node.js
#
# Options:
#
# -d Actually delete files, otherwise the script just _prints_ a command to delete.
# -p Installation prefix. Default /usr/local
# -f BOM file. Default /var/db/receipts/org.nodejs.pkg.bom

Change screenshot folder

defaults write com.apple.screencapture location /path/
killall SystemUIServer