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 / 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 => {

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 / generate icon splash.md
Last active January 19, 2021 05:25
generate icon splash
@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
import PropTypes from 'prop-types'
const propTypes = {
codeLength: PropTypes.number.isRequired
}
const defaultProps = {
codeLength: 5
}
@hungdev
hungdev / gist:341cc224754d54ce0e6fc4f1cbd33f70
Last active February 13, 2018 17:30
Config release google signin

Để release cho google signin phải add mã sha1 release chứ không phải mã sha1 như lúc debug.

Bước 1: tạo my-release-key.keystore

tạo key này như hướng dẫn của bên docs (https://facebook.github.io/react-native/docs/signed-apk-android.html)

thì phải vô đường dẫn này C:\Program Files\Java\jdkx.x.x_x\bin. (trên windows)

còn trên mac sẽ là /Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/bin/keytool (trên mac)

@hungdev
hungdev / shadow button.md
Last active October 28, 2018 17:03
shadow button
less
borderWidth: 1,
borderRadius: 2,
borderColor: '#ddd',
borderBottomWidth: 0,
shadowColor: '#000',
shadowOffset: { width: 0, height: 2 },
shadowOpacity: 0.8,
shadowRadius: 2,

elevation: 1,

@hungdev
hungdev / gist:6c5af93bf5321a6d73c85c90c9d07c76
Created March 11, 2018 07:22
config permission camera roll for ios
https://facebook.github.io/react-native/docs/linking-libraries-ios.html
https://useyourloaf.com/blog/privacy-settings-in-ios-10/
Privacy - Media Library Usage Description
@hungdev
hungdev / gist:06b471e5c800c117a2c10c8ac752ba6b
Last active March 20, 2018 12:41
Configuration with name 'default' not found.
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugApk'.
> Configuration with name 'default' not found.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.