Skip to content

Instantly share code, notes, and snippets.

View zfs-systemctl-state
# systemctl list-unit-files | grep -i zfs
zfs-import-cache.service enabled enabled
zfs-import-scan.service disabled disabled
zfs-import.service masked enabled
zfs-load-module.service enabled enabled
zfs-mount.service enabled enabled
zfs-share.service enabled enabled
zfs-volume-wait.service enabled enabled
zfs-zed.service enabled enabled enabled enabled
View zsys-setup ubuntu 20.04
#cat /usr/share/ubiquity/zsys-setup
# This script creates ZFS pools and dataset compatible with zsys
# Layout:

Keybase proof

I hereby claim:

  • I am andaag on github.
  • I am andaag ( on keybase.
  • I have a public key ASALdtE-JmrCtsCl1_jP0z7ypNZrvzasaKIAqRNuG0gPZgo

To claim this, I am signing this object:

View embedded dynamodb with kotlin.kt
import org.jetbrains.spek.api.dsl.Spec
import org.jetbrains.spek.api.lifecycle.CachingMode
import org.jetbrains.spek.api.lifecycle.LifecycleAware
import java.nio.file.Files
import java.nio.file.Paths
andaag /
Last active February 15, 2016 17:12
A script to copy some eureka instances from a remote eureka to a local one. I use it to pull some dev eurekas into a docker-compose setup.
import json
import urllib
import urllib.request
import gzip
import os
### Need to setup some env's first
import android.content.ContentResolver;
import android.database.ContentObserver;
import android.database.Cursor;
import android.os.Handler;
import android.os.Looper;
View Implemented
public class RxActivityDelegate {
private static final String KEY_OBJECT = "rxActivityController.object";
private static final String KEY_OBJECTTYPE = "rxActivityController.object.type";
private static final String KEY_REQUESTCODE = "rxActivityController.requestCode";
public static void setResponse(Activity activity, int requestCode, RxResponseHandler rxResponseHandler) {
Intent intent = activity.getIntent();
intent.putExtra(KEY_OBJECT, JsonUtils.toBytes(rxResponseHandler));
intent.putExtra(KEY_OBJECTTYPE, rxResponseHandler.getClass().getName());
andaag / gist:b05ab66ed0f06167d6e0
Last active April 9, 2018 12:43
workaround for shareactionprovider leak
View gist:b05ab66ed0f06167d6e0
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import android.content.Context;
import android.content.Intent;
import android.widget.ShareActionProvider;
andaag / gist:ec1339635b5188a6b137
Last active August 29, 2015 14:20
generic serialization with logansquared
View gist:ec1339635b5188a6b137
public class GenericTypeConverter implements TypeConverter<GenericTypeConverter.GenericType> {
public GenericType parse(JsonParser jsonParser) throws IOException {
String field = null;
String value = null;
String fieldType = null;
String data = null;
View gist:2803af6f7f69548345ff
DEVICES=$(adb devices | egrep -v 'List of devices' | cut -f 1 | xargs echo)
IFS=' '
echo "Installing emulator hacks"
for DEVICE in $DEVICES; do
adb -s $DEVICE uninstall &>/dev/null
adb -s $DEVICE install -r "src/main/resources/android_emulator_hacks.apk" || exit 1
adb -s $DEVICE shell pm grant no.finn.android_emulator_hacks android.permission.SET_ANIMATION_SCALE
adb -s $DEVICE shell am start -n no.finn.android_emulator_hacks/no.finn.android_emulator_hacks.HackActivity