Skip to content

Instantly share code, notes, and snippets.

View andhikayuana's full-sized avatar
🌏
bertapa

Andhika Yuana andhikayuana

🌏
bertapa
View GitHub Profile
@andhikayuana
andhikayuana / tmux-cheatsheet.markdown
Created April 16, 2018 14:21 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@andhikayuana
andhikayuana / android_studio_shortcuts.md
Created April 22, 2018 02:16 — forked from stkent/android_studio_shortcuts.md
Android Studio Shortcuts (Mac)

Android Studio Shortcuts (Mac)

Notes:

  • Two of the most useful shortcuts utilize the Fn (function) keys. It is therefore recommended that you enable the "Use all F1, F2, etc. keys as standard function keys" option [System Preferences > Keyboard].
  • Be sure to enable the Mac OS X 10.5+ keymap in Android Studio [Preferences > Keymap].
  • A fairly complete shortcut list can be found here.

Useful symbols:

@andhikayuana
andhikayuana / README.md
Created April 27, 2018 04:31 — forked from lopspower/README.md
Configuration of proguard-rules.pro

Proguard Configuration

Twitter

1) Enable Proguard in your build.gradle module :

android {
    //...
 buildTypes {
@andhikayuana
andhikayuana / KeyboardObserver.java
Created May 14, 2018 04:15
KeyboardObserve Util for Android
public class KeyboardObserver implements ViewTreeObserver.OnGlobalLayoutListener {
private final static int MAGIC_NUMBER = 200;
private SoftKeyboardToggleListener mCallback;
private View mRootView;
private float mScreenDensity = 1;
private static HashMap<SoftKeyboardToggleListener, KeyboardObserver> sListenerMap = new HashMap<>();
public interface SoftKeyboardToggleListener {
void onToggleSoftKeyboard(boolean isVisible);
@andhikayuana
andhikayuana / .travis.yml
Created May 29, 2018 02:24 — forked from willprice/.travis.yml
How to set up TravisCI for projects that push back to github
# Ruby is our language as asciidoctor is a ruby gem.
lang: ruby
before_install:
- sudo apt-get install pandoc
- gem install asciidoctor
script:
- make
after_success:
- .travis/push.sh
env:
@andhikayuana
andhikayuana / dependencies.gradle
Created May 30, 2018 06:45
Dependencies Management for Android
ext {
versions = [
support : "27.0.2",
firebase : '11.8.0',
okHttp : "3.9.1",
retrofit : '2.3.0',
dagger : '2.14.1',
butterKnife : '8.8.1',
rxJava : '2.1.5',
rxJavaAndroid : '2.0.1',
$ git clone git@github.com:andhikayuana/realm-crud.git
@andhikayuana
andhikayuana / gitlab-ci.yml
Last active June 10, 2018 05:24
build android using gitlab ci
# author Yuana
# since june, 20 2018
image: azabost/android-sdk-27:latest
before_script:
- export GRADLE_USER_HOME=`pwd`/.gradle
cache:
paths:
@andhikayuana
andhikayuana / PermissionDef.java
Created June 30, 2018 22:37 — forked from jmarkovic/PermissionDef.java
Android annotation defining all permissions in a StringDef annotation.
/**
* Typedef annotation listing all permissions
* available in the latest SDK.
* Using this on a method parameter
* or on a method with {@link String} return value
* will trigger value lookup in Android Studio.
*
* @version SDK23
* @author jmarkovic
*/
@andhikayuana
andhikayuana / BaseAdapter.java
Last active August 23, 2020 00:50
BaseRecyclerViewAdapter Android
/**
* @author Yuana andhikayuana@gmail.com
* @since Jun, Sun 10 2018 13.44
**/
public abstract class BaseAdapter<T, V extends BaseViewHolder> extends RecyclerView.Adapter<V> {
protected List<T> data = new ArrayList<T>();
protected Context context;
protected OnItemClickListener itemClickListener;
protected OnLongItemClickListener longItemClickListener;