Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Esa Firman esafirm

🏠
Working from home
Block or report user

Report or block esafirm

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@esafirm
esafirm / instruction.md
Last active Mar 4, 2019
Android Nougat Above - Install Certificate to System
View instruction.md

For more information https://blog.jeroenhd.nl/article/android-7-nougat-and-certificate-authorities


Ran into this issue as well while trying to check for privacy implications of an app. The blog post and docs linked above does explain what happened, but not how. Source code references follows based on nougat-mr2.3.

The change was made in commit aosp-mirror/platform_frameworks_base@32d2a10, see frameworks/base:core/java/android/security/net/config/NetworkSecurityConfig.java. After that change, only the [system root store](https://github.com/android/platform_frameworks_base/blob/nougat-m

@esafirm
esafirm / puzzler.ipynb
Last active Jul 19, 2018
ADB Meetup #4 - Kotlin Puzzler
View puzzler.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View LRU.java
public class LruStorage extends LinkedHashMap<String, byte[]>
implements KV.Storage {
private final ExecutorService mService = Executors.newSingleThreadExecutor();
private final KV.Storage mStorage;
private final int mMaxSize;
public LruStorage(KV.Storage storage, int size) {
super(size/2, 0.75f, true);
mStorage = storage;
@esafirm
esafirm / DenomSuggestion.kt
Last active Jul 30, 2017
Given some amount, return possible values that constructed by particular denomination
View DenomSuggestion.kt
val denom = arrayOf(1, 2, 5, 10, 20, 50, 100)
val amount = arrayOf(5, 11, 53, 122, 155, 157, 210, 200)
fun main(args: Array<String>) = amount.forEach { currentAmount ->
val suggestions = mutableListOf<Int>()
denom.forEach {
if (it >= currentAmount) {
suggestions += it
View gist:fbda7c3e3f45b9ace9091a94ed54f080
Testing started at 9:26 AM ...
07/18 09:26:57: Launching LoginActivityEspress...
$ adb push /Users/esa/Documents/AndroidStudioProjects/driver-android-new/apks/etobeedriver-dev-debug.apk /data/local/tmp/com.etobee.driver
$ adb shell pm install -r "/data/local/tmp/com.etobee.driver"
pkg: /data/local/tmp/com.etobee.driver
Success
$ adb push /Users/esa/Documents/AndroidStudioProjects/driver-android-new/etobeedriver/build/outputs/apk/etobeedriver-dev-debug-androidTest.apk /data/local/tmp/com.etobee.driver.test
View DNSCrypt
Pasang ini untuk membuka akses blokir selain tiga dibawah ini. Pilih resolver yang paling deket (singapura)
https://dnscrypt.org
@esafirm
esafirm / build.gradle
Created Nov 3, 2016 — forked from ph0b/build.gradle
sample build.gradle for generating split APKs per ABI
View build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
defaultConfig{
minSdkVersion 14
targetSdkVersion 21
versionCode 101
@esafirm
esafirm / podfile.rb
Created Oct 26, 2016
Podfile for Rame to achieve Swift 3 compatibility
View podfile.rb
# Uncomment this line to define a global platform for your project
platform :ios, '8.0'
# Uncomment this line if you're using Swift
use_frameworks!
target 'Rame' do
pod 'Alamofire', :git => 'https://github.com/Homely/Alamofire.git', :branch => 'ios8'
pod "SWSegmentedControl"
pod 'Google/SignIn'
pod 'Charts', :git => 'https://github.com/danielgindi/Charts.git', :tag => 'v3.0.0'
@esafirm
esafirm / README
Created Sep 24, 2016 — forked from MarsVard/README
android drawable to imitate google cards.
View README
put card.xml in your drawables directory, put colors.xml in your values directory or add the colors to your colors.xml file.
set the background of a view to card,
as you can see in card.xml the drawable handles the card margin, so you don't have to add a margin to your view
``` xml
<View
android:layout_width="fill_parent"
@esafirm
esafirm / NoteRepository.java
Last active Sep 8, 2016
Realm object repository sample
View NoteRepository.java
// The code using Java 8 Lambda
public class NoteRepository {
public static Note createNote() {
Note note = new Note();
note.setId(new RandomString(6).nextString());
return note;
}
public static void updateTitle(String noteId, String title) {
You can’t perform that action at this time.