Skip to content

Instantly share code, notes, and snippets.

View milosmns's full-sized avatar
👨‍💻
Using software to build, break and fix other software.

Milos Marinkovic milosmns

👨‍💻
Using software to build, break and fix other software.
View GitHub Profile
@milosmns
milosmns / ColorScheme-Dark.icls
Last active December 24, 2020 10:10
IntelliJ IDEA - Light and Dark Color Schemes
<scheme name="AngryByte-Dark" version="142" parent_scheme="Darcula">
<metaInfo>
<property name="created">2020-12-24T10:53:24</property>
<property name="ide">idea</property>
<property name="ideVersion">2020.3.0.0</property>
<property name="modified">2020-12-24T10:53:35</property>
<property name="originalScheme">AngryByte-Dark</property>
</metaInfo>
<colors>
<option name="ADDED_LINES_COLOR" value="446c17" />
@milosmns
milosmns / Encryption.kt
Created June 17, 2019 16:44
Encryption helper
package util
import at.favre.lib.bytes.Bytes
import java.nio.ByteBuffer
import java.security.Provider
import java.security.SecureRandom
import javax.crypto.Cipher
import javax.crypto.spec.GCMParameterSpec
import javax.crypto.spec.SecretKeySpec
@milosmns
milosmns / [ THE SILVER BULLET ]
Last active June 26, 2018 11:04
Android Library - publishing to Maven (THE SILVER BULLET)
This is used for my blog post about publishing Android apps. Start reading here:
https://angrybyte.me/post/174861019530/android-libraries-how-to-1
@milosmns
milosmns / Solution.java
Created February 18, 2017 16:10
Solution to the array equilibrium problem on Codility
class Solution {
public int solution(int[] A) {
// false inputs
if (A == null || A.length == 0) {
return -1;
}
// 1-length array
if (A.length == 1) {
@milosmns
milosmns / Coloring.java
Last active November 23, 2023 06:06
Android: Coloring (Helper Class)
package me.angrybyte.coloringdemo;
/**
* IMPORTANT NOTICE
*
* This is now a part of SillyAndroid https://github.com/milosmns/silly-android,
* with new fixes and improvements.
*/
@milosmns
milosmns / AbstractLifecycleActivity.java
Last active August 29, 2015 14:27
Hack for the Activity Lifecycle annoyance
package me.angrybyte.lifecycle;
import android.app.Activity;
import android.os.Bundle;
import android.os.PersistableBundle;
import android.support.v7.app.AppCompatActivity;
/**
* <p>
* A simple, <i>hacky</i> solution to Android's Activity Lifecycle which has no guaranteed invocation of {@link Activity#onStop()} and