Skip to content

Instantly share code, notes, and snippets.

View esskar's full-sized avatar
🙋‍♂️
Hello!

Sascha Kiefer esskar

🙋‍♂️
Hello!
View GitHub Profile
@esskar
esskar / fakeserver.py
Created September 7, 2018 14:46 — forked from dlenski/fakeserver.py
Fake server for RSA SecurID token generation
#!/usr/bin/env python3
# Needs: Python 3.5+, Flask, PyCryptoDome
# server.pem, rsapubkey.pem + rsaprivkey.pem (1024-bit) in the current directory
#
# What it does:
# Pretends to be the "CT-KIP" web service (https://tools.ietf.org/html/rfc3948) that
# RSA SecurID Token for Windows v5.0.x talks to to set up a new token, using an
# authentication code.
#
@esskar
esskar / MultiSelectItemAnimator.java
Created August 16, 2018 15:52 — forked from darnmason/MultiSelectItemAnimator.java
ItemAnimator for RecyclerView that animates changes between 2 states, edit and standard which is useful for multi select using check boxes. In edit mode a checkBox slides in from the left and an icon slides off screen to the right. In between an avatar and name view must adjust their positions. All 4 views are in a horizontal LinearLayout with w…
public class MultiSelectItemAnimator extends DefaultItemAnimator {
private static final long DURATION = 150;
private final ArrayMap<RecyclerView.ViewHolder, AnimatorInfo> animatorMap = new ArrayMap<>();
private final Animator.AnimatorListener resetListener = new ViewObjectAnimatorListener() {
@Override
public void onAnimationEnd(Animator animation, View view) {
view.setTranslationX(0f);
}