Skip to content

Instantly share code, notes, and snippets.

View Kraiden's full-sized avatar

Kraiden

View GitHub Profile

Keybase proof

I hereby claim:

  • I am Kraiden on github.
  • I am kraiden (https://keybase.io/kraiden) on keybase.
  • I have a public key whose fingerprint is 637E 6EFB D4AF 98C7 4798 8180 10C5 2D14 A306 024B

To claim this, I am signing this object:

@Kraiden
Kraiden / BetterBounceInterpolator.java
Last active December 30, 2020 03:31
A more configurable bounce interpolator for Android animations
import android.view.animation.Interpolator;
import static java.lang.Math.*;
public class BetterBounceInterpolator implements Interpolator {
private int mBounces;
private double mEnergy;
/** Have more control over how to bounce your values.
*
import android.util.Log
class ELog() {
companion object {
@JvmStatic fun d(tag: String, msg: String) = Log.d(tag, prependFile(msg))
@JvmStatic fun d(tag: String, msg: String, tr: Throwable) = Log.d(tag, prependFile(msg),tr)
@JvmStatic fun i(tag: String, msg: String) = Log.i(tag, prependFile(msg))
@JvmStatic fun i(tag: String, msg: String, tr:Throwable) = Log.i(tag, prependFile(msg),tr)
@Kraiden
Kraiden / Markov.kt
Created July 16, 2021 04:55
Simple Markov word generator
import kotlin.random.Random
/**
* A very simple, very dumb markov chain thing for generating made up names for a game I'm playing. Don't judge me on this.
*/
class Markov(input: List<String>){
val dict = HashMap<Char, MutableMap<Char?, Int>>()
private val starters = input.map { it.first() }
init {