Skip to content

Instantly share code, notes, and snippets.

import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Job
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
/*
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
@Amejia481
Amejia481 / Best_Practices_Slim_Down_APK_IO17.gradle
Created June 27, 2017 20:14
Snippets for the talk Best Practices to Slim Down Your App Size (Google I/O '17) video https://youtu.be/AdfKNgyT438?list=PLWz5rJ2EKKc-odHd6XEaf7ykfsosYyCKp
/**
Use Proguard
Video section: https://youtu.be/AdfKNgyT438?list=PLWz5rJ2EKKc-odHd6XEaf7ykfsosYyCKp&t=413
**/
android {
buildTypes {
release {
minifyEnabled true
}
}
@mcxiaoke
mcxiaoke / README.md
Created April 19, 2017 05:46 — forked from polbins/README.md
Android Studio as default Git Diff Tool

Create Android Studio Command-line Launcher

  1. Open Android Studio
  2. Go to: Tools > Create Command-line Launcher
  3. Leave as default, Press OK

Configure Git to use Android Studio as default Diff Tool

  1. Add the following lines to your .gitconfig
@amadamala
amadamala / HashTable.java
Last active June 28, 2022 03:55
HashTable implementation in Java
public class HashTable {
private static int INITIAL_SIZE = 16;
private HashEntry[] entries = new HashEntry[INITIAL_SIZE];
public void put(String key, String value) {
int hash = getHash(key);
final HashEntry hashEntry = new HashEntry(key, value);
if(entries[hash] == null) {
entries[hash] = hashEntry;
}
// If there is already an entry at current hash