Skip to content

Instantly share code, notes, and snippets.

View toantran-ea's full-sized avatar

Toan Tran toantran-ea

View GitHub Profile
@file:Suppress("BlockingMethodInNonBlockingContext")
package features.file.download
import android.content.Context
import androidx.hilt.Assisted
import androidx.hilt.work.WorkerInject
import androidx.lifecycle.Observer
import androidx.work.Constraints
import androidx.work.CoroutineWorker
Academic/Background
------------------------------------------------------------------------------------------------------------
Software Architecture, Perspectives on an emerging discipline - Mary Shaw, David Garlan
Introduction / Practice within Business
------------------------------------------------------------------------------------------------------------
Software Architecture in Practice - Len Bass, Paul Clements, Rick Kazman
In depth handbook for reaching requirements
------------------------------------------------------------------------------------------------------------
@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 / 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