Skip to content

Instantly share code, notes, and snippets.

View trungpv1601's full-sized avatar
🤖
Diversifying; Practical; more code than talk.

trungpv trungpv1601

🤖
Diversifying; Practical; more code than talk.
View GitHub Profile
@trungpv1601
trungpv1601 / backup_restore_mysql_gzip.sh
Last active April 28, 2017 05:50
Backup & Restore Mysql gzip
// Backup
mysqldump -u root -p databasename | gzip > databasename.sql.gz
// Restore
zcat databasename.sql.gz | mysql -u root -p databasename
@trungpv1601
trungpv1601 / facebook-invite-like-post-like-page.js
Created April 6, 2017 04:01
Invite people like post like page facebook
// Go to post page -> click show popup people like post -> run script
// 04/06/2017
var keepContinue = 0;
var cancel = setInterval(function(){
keepContinue++;
var seeMore = document.getElementsByClassName('pam uiBoxLightblue uiMorePagerPrimary');
if(seeMore.length == 1) {
seeMore[0].click();
} else {
inviteAll();
@trungpv1601
trungpv1601 / Dismiss keyboard on React Native.MD
Last active March 15, 2017 05:00
Dismiss keyboard on React Native: Tắt keyboard khi chạm ra ngoài TextInput

Dismiss keyboard on React Native: Tắt keyboard khi chạm ra ngoài TextInput

import React, { Component } from 'react';
import { TouchableWithoutFeedback, View, TextInput } from 'react-native';
import dismissKeyboard from 'react-native/Libraries/Utilities/dismissKeyboard';

export default class LoginForm extends Component {

 constructor(props) {