Skip to content

Instantly share code, notes, and snippets.

View toantran-ea's full-sized avatar

Toan Tran toantran-ea

View GitHub Profile
@toantran-ea
toantran-ea / React Native Clear Cache
Created July 18, 2018 14:07 — forked from jarretmoses/React Native Clear Cache
Clearing the Cache of your React Native Project
RN < 0.50 - watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache clean && npm install && npm start -- --reset-cache
RN >= 0.50 - watchman watch-del-all && rm -rf $TMPDIR/react-native-packager-cache-* && rm -rf $TMPDIR/metro-bundler-cache-* && rm -rf node_modules/ && npm cache clean && npm install && npm start -- --reset-cache
npm >= 5 - watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache verify && npm install && npm start -- --reset-cache
Windows - del %appdata%\Temp\react-native-* & cd android & gradlew clean & cd .. & del node_modules/ & npm cache clean --force & npm install & npm start -- --reset-cache
@toantran-ea
toantran-ea / React Native Clear Cache
Created July 18, 2018 14:07 — forked from jarretmoses/React Native Clear Cache
Clearing the Cache of your React Native Project
RN < 0.50 - watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache clean && npm install && npm start -- --reset-cache
RN >= 0.50 - watchman watch-del-all && rm -rf $TMPDIR/react-native-packager-cache-* && rm -rf $TMPDIR/metro-bundler-cache-* && rm -rf node_modules/ && npm cache clean && npm install && npm start -- --reset-cache
npm >= 5 - watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache verify && npm install && npm start -- --reset-cache
Windows - del %appdata%\Temp\react-native-* & cd android & gradlew clean & cd .. & del node_modules/ & npm cache clean --force & npm install & npm start -- --reset-cache
@toantran-ea
toantran-ea / .gitlab-ci.yml
Created July 16, 2018 09:02 — forked from danielgomezrico/.gitlab-ci.yml
Android / Gitlab ci - sample setup files to setup your own local gitlab runner with real physical android devices. Check https://github.com/caipivara/awesome-android-scripts
stages:
- build
- test
- deploy
variables:
GIT_STRATEGY: clone
cache:
key: ${CI_PROJECT_ID}
@toantran-ea
toantran-ea / Clean dns cache macOS.md
Last active June 30, 2018 06:50
Clear dns cache when there is problem switching vpn tunnel
sudo ifconfig en0 down # take the networking interface down
sudo route flush # flush the route table
sudo ifconfig en0 up # take the interface back online
@toantran-ea
toantran-ea / The passionate programmer - 2nd edition - read #2 2018.md
Last active June 12, 2018 14:33
This is my note on the famous book titled The Passionate programmer - Creating a remarkable career in software development by Chad Fowler

First time read this book was in 2015, now I read it again and enjoy that feeling of this book

Part 1

Chap 1: Choose your market

  • Tip 1: Lead ore bleed: Invest into your technology stack of choice is just like any other investment you may have. There are risk and there are rewards but there will be never an assurane that risk and reward will be together at the end. So, learn the investment principles, analyze them and apply.
@toantran-ea
toantran-ea / Working Effectively with Legacy Code.md
Created June 12, 2018 14:02 — forked from jeremy-w/Working Effectively with Legacy Code.md
Notes on Michael Feathers' *Working Effectively with Legacy Code*.

Working Effectively with Legacy Code

Notes by Jeremy W. Sherman, October 2013, based on:

Feathers, Michael. Working Effectively with Legacy Code. Sixth printing, July 2007.

Foreword:

  • Software systems degrade into a mess.
  • Requirements ALWAYS change.
  • Your goal as a software developer: Create designs that tolerate change.
@toantran-ea
toantran-ea / AES256Cipher.java
Created February 21, 2018 10:19 — forked from dealforest/AES256Cipher.java
AES256 encryption on Android
package net.dealforest.sample.crypt;
import javax.crypto.BadPaddingException;
import javax.crypto.Cipher;
import javax.crypto.IllegalBlockSizeException;
import javax.crypto.NoSuchPaddingException;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;
import java.security.InvalidKeyException;
@toantran-ea
toantran-ea / introrx.md
Created February 17, 2018 08:51 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@toantran-ea
toantran-ea / RecordingActivity.java
Created January 31, 2018 09:27 — forked from chathudan/RecordingActivity.java
Android Audio recording, MediaRecorder example
/**
* @author Chathura Wijesinghe <[email protected]> on 9/9/15.
*/
public class RecordingActivity extends AppCompatActivity implements View.OnClickListener {
private TextView mTimerTextView;
private Button mCancelButton;
private Button mStopButton;
private MediaRecorder mRecorder;
@toantran-ea
toantran-ea / postgres-brew.md
Created November 5, 2017 15:32 — forked from sgnl/postgres-brew.md
Installing Postgres via Brew (OSX)

Installing Postgres via Brew

Pre-Reqs

Brew Package Manager

In your command-line run the following commands:

  1. brew doctor
  2. brew update