Skip to content

Instantly share code, notes, and snippets.

View ngothanhtai's full-sized avatar

Walter Ngo ngothanhtai

View GitHub Profile
@ngothanhtai
ngothanhtai / index.ios.js
Created August 27, 2017 03:05
Gauge progress
/**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
AppRegistry
} from 'react-native';
@ngothanhtai
ngothanhtai / masonryLayout.js
Last active April 6, 2018 09:04
react-native masonry layout
/**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
@ngothanhtai
ngothanhtai / category.js
Created March 19, 2017 15:30
Yelp's categories
const categories = [{"name": "Afghan", "code": "afghani"},
{"name": "African", "code": "african"},
{"name": "American, New", "code": "newamerican"},
{"name": "American, Traditional", "code": "tradamerican"},
{"name": "Arabian", "code": "arabian"},
{"name": "Argentine", "code": "argentine"},
{"name": "Armenian", "code": "armenian"},
{"name": "Asian Fusion", "code": "asianfusion"},
{"name": "Asturian", "code": "asturian"},
{"name": "Australian", "code": "australian"},
@ngothanhtai
ngothanhtai / LoginManager.swift
Last active April 7, 2016 16:07
Auth0 + AWS Cognito
import Foundation
import AWSCognito
import Lock
import JWTDecode
class LoginManager {
let provider: AWSCognitoCredentialsProvider
init() {
AWSLogger.defaultLogger().logLevel = AWSLogLevel.None
self.provider = AWSCognitoCredentialsProvider.init(regionType: AWSRegionType.USEast1, identityPoolId: CognitoConfig.CognitoPoolID)
@ngothanhtai
ngothanhtai / DetectSaveChange.cs
Last active October 9, 2015 08:41
Detect save change in Editor mode - Unity3D C#
using UnityEngine;
using System.Collections;
using System.IO;
namespace TaiNgo
{
[ExecuteInEditMode]
public class Activator : MonoBehaviour {