Skip to content

Instantly share code, notes, and snippets.

View hungdev's full-sized avatar
💭
I may be slow to respond.

Hung Vu hungdev

💭
I may be slow to respond.
View GitHub Profile
@hungdev
hungdev / SyncPath.js
Created November 4, 2017 04:15 — forked from davideast/SyncPath.js
Firebase Social Network Client Fanout
export class SyncPath {
constructor(rootRef, path) {
this._rootRef = rootRef;
this.user = this._rootRef.getAuth();
this._userDataRef = this._rootRef.child(path).child(this.user.uid);
this.data = {};
this._userDataRef.on('value', (snap) => this.data = snap.val() || {});
}
keys() {
return Object.keys(this.data);
@hungdev
hungdev / README.md
Created December 7, 2017 15:27 — forked from hofmannsven/README.md
My simply MySQL Command Line Cheatsheet
/* @flow */
const defaultDiacriticsRemovalMap = [{
'base': 'A',
'letters': '\u0041\u24B6\uFF21\u00C0\u00C1\u00C2\u1EA6\u1EA4\u1EAA\u1EA8\u00C3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\u00C4\u01DE\u1EA2\u00C5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F'
}, {
'base': 'AA',
'letters': '\uA732'
}, {
'base': 'AE',
'letters': '\u00C6\u01FC\u01E2'
import React, { PureComponent } from 'react';
import { View, Text, NetInfo, Dimensions, StyleSheet } from 'react-native';
const { width } = Dimensions.get('window');
function MiniOfflineSign() {
return (
<View style={styles.offlineContainer}>
<Text style={styles.offlineText}>No Internet Connection</Text>
</View>
@hungdev
hungdev / index.js
Created September 25, 2018 04:12 — forked from AlexBrasileiro/index.js
ShareYourFeedback
import React, { Component, Fragment } from "react";
import { Animated, StyleSheet, Text, View, TouchableOpacity, Dimensions, Platform, Easing, TextInput, KeyboardAvoidingView, Image } from "react-native";
import FontAwesome5 from 'react-native-vector-icons/FontAwesome5';
const { width: windowWidth } = Dimensions.get('window');
const Icon = (props) => <FontAwesome5 {...props} />
export default class ShareYourFeedback extends Component {
@hungdev
hungdev / react-file-upload.js
Created November 10, 2018 16:25 — forked from AshikNesin/react-file-upload.js
Simple React File Upload
import React from 'react'
import axios, { post } from 'axios';
class SimpleReactFileUpload extends React.Component {
constructor(props) {
super(props);
this.state ={
file:null
}
@hungdev
hungdev / css-selectors.md
Created January 31, 2019 03:56 — forked from magicznyleszek/css-selectors.md
CSS Selectors Cheatsheet

CSS Selectors Cheatsheet

Element selectors

Element -- selects all h2 elements on the page

h2 {
    foo: bar;
@hungdev
hungdev / LC_CTYPE.txt
Created April 1, 2019 16:30 — forked from HJianBo/LC_CTYPE.txt
Centos warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory
vi /etc/environment
add these lines...
LANG=en_US.utf-8
LC_ALL=en_US.utf-8
###############################################################################
# SECTION:Initial Settings
###############################################################################
# ConfigServer Firewall & Security Configuration File
#
# Copyright 2006-2013, Way to the Web Limited
# URL: http://www.configserver.com
# Email: sales@waytotheweb.com
###############################################################################
@hungdev
hungdev / Start and Stop Jenkins on OSX.md
Last active July 16, 2019 02:59 — forked from ehuynh/gist:2572398
Start and Stop Jenkins on OSX