Skip to content

Instantly share code, notes, and snippets.

View kiratheone's full-sized avatar
❤️
Kotlin

Arik Achmad kiratheone

❤️
Kotlin
View GitHub Profile
@jterral
jterral / azure-pipelines__ios__.yaml
Last active January 21, 2024 09:34
Azure Pipelines to build and deploy iOS appplication with AppCenter
#
# Azure Pipelines
trigger:
batch: true
name: $(Build.BuildId)_$(SourceBranchName)_$(Date:yyyyMMdd)$(Rev:.r)
variables:
- group: my-group-var
@jidolstar
jidolstar / ChCrypto.java
Last active February 26, 2024 16:04
AES 256 encrypt / decrypt - JAVA, PHP, Kotlin
package chela.spring.core;
import javax.crypto.Cipher;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;
import java.util.Base64;
final public class ChCrypto {
final static Base64.Encoder encorder = Base64.getEncoder();
final static Base64.Decoder decorder = Base64.getDecoder();
@micer
micer / RealPathUtil.kt
Last active April 18, 2021 01:21
Utility class to get real path from URI object - all API versions
import android.content.ContentUris
import android.content.Context
import android.database.Cursor
import android.net.Uri
import android.os.Build
import android.os.Environment
import android.provider.DocumentsContract
import android.provider.MediaStore
import android.support.v4.content.CursorLoader
import android.text.TextUtils
@AkshayChordiya
AkshayChordiya / ApiResponse.java
Last active February 3, 2024 01:47
LiveData adapter for Retrofit
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.util.ArrayMap;
import java.io.IOException;
import java.util.Collections;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@tinmegali
tinmegali / LiveData.ext.kt
Created July 14, 2017 19:14
Kotlin extension to allow Unit tests on Android LiveData
package com.tinmegali.daggerwithkotlin.room
import android.arch.lifecycle.LiveData
import android.arch.lifecycle.Observer
import java.util.concurrent.CountDownLatch
import java.util.concurrent.TimeUnit
// Extension to allow unit tests on LiveData
// discussion on: https://stackoverflow.com/questions/44270688/unit-testing-room-and-livedata
@chris-carneiro
chris-carneiro / TamperUtils.java
Last active July 6, 2021 04:19
How to check android apk integrity/tampering at runtime
package com.twinpeek.android.app;
import java.io.File;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.security.NoSuchProviderException;
import android.content.Context;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageInfo;
@adavis
adavis / CommonExtensions.kt
Last active April 2, 2024 20:51
Common Android Extensions in Kotlin
fun View.visible() {
visibility = View.VISIBLE
}
fun View.invisible() {
visibility = View.INVISIBLE
}
fun View.gone() {
visibility = View.GONE
@Robyer
Robyer / maven-publish-helper-usage.gradle
Last active June 15, 2023 04:22
Gradle script for publishing Android library with sources and javadoc to Maven repository using maven-publish plugin.
// You can use maven-publish-helper.gradle script without changes and even share it between multiple
// modules. Just place the maven-publish-helper.gradle file in the root directory of your project,
// then apply it at the bottom of your module's build.gradle file like this:
// ...content of module's build.gradle file...
apply from: '../maven-publish-helper.gradle'
publishing {
publications {
apply plugin: 'com.android.application'
apply plugin: 'android-apt'
android {
compileSdkVersion versions.compileSdk
buildToolsVersion versions.buildTools
defaultConfig {
applicationId "samples.linhtruong.com.ui_reactive_rxjava_realm"
minSdkVersion versions.minSdk
@bobbygrace
bobbygrace / trello-css-guide.md
Last active April 22, 2024 10:15
Trello CSS Guide

Hello, visitors! If you want an updated version of this styleguide in repo form with tons of real-life examples… check out Trellisheets! https://github.com/trello/trellisheets


Trello CSS Guide

“I perfectly understand our CSS. I never have any issues with cascading rules. I never have to use !important or inline styles. Even though somebody else wrote this bit of CSS, I know exactly how it works and how to extend it. Fixes are easy! I have a hard time breaking our CSS. I know exactly where to put new CSS. We use all of our CSS and it’s pretty small overall. When I delete a template, I know the exact corresponding CSS file and I can delete it all at once. Nothing gets left behind.”

You often hear updog saying stuff like this. Who’s updog? Not much, who is up with you?