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
import PropTypes from 'prop-types'
const propTypes = {
codeLength: PropTypes.number.isRequired
}
const defaultProps = {
codeLength: 5
}
@hungdev
hungdev / README.md
Created December 7, 2017 15:27 — forked from hofmannsven/README.md
My simply MySQL Command Line Cheatsheet
@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 / generate icon splash.md
Last active January 19, 2021 05:25
generate icon splash

install java, jdk, sdk.... first

use vim: vi ~/.bashrc and vi ~/.bash_profile ( use vim to create file) then paste below lines to that. ( use shift + zz to save and close vim or or esc button and :x)

if file is exist, you can open with nano: sudo nano ~/.bash_profile

(prioritize: ~/.bash_profile)

export ANDROID_HOME=/Users/cee/Library/Android/sdk
@hungdev
hungdev / alert React native
Created July 22, 2017 02:49
alert React native
Alert.alert(
'Qubikal',
'Delete Image?',
[
{ text: 'No', onPress: () => console.log('Cancel Pressed'), style: 'cancel' },
{
text: 'Yes',
onPress: () => {
api.setToken(this.props.user.token)
api.deleteImage(this.props.image._id).then(response => {