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
zfs-import.target enabled enabled
View zsys-setup ubuntu 20.04 beta.sh
#cat /usr/share/ubiquity/zsys-setup
#!/bin/sh
#
# This script creates ZFS pools and dataset compatible with zsys
#
# Layout:
View keybase.md

Keybase proof

I hereby claim:

  • I am andaag on github.
  • I am andaag (https://keybase.io/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
package com.schibsted.mp.ads.sales
import com.amazonaws.services.dynamodbv2.AmazonDynamoDB
import com.amazonaws.services.dynamodbv2.local.embedded.DynamoDBEmbedded
import org.jetbrains.spek.api.dsl.Spec
import org.jetbrains.spek.api.lifecycle.CachingMode
import org.jetbrains.spek.api.lifecycle.LifecycleAware
import java.io.File
import java.nio.file.Files
import java.nio.file.Paths
@andaag
andaag / eureka-proxy.py
Last active Feb 15, 2016
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.
View eureka-proxy.py
#!/usr/bin/python3
import json
import urllib
import urllib.request
import gzip
import os
### Need to setup some env's first
EUREKA_SOURCE = os.environ["EUREKA_SOURCE"]
View RxContentProvider.java
package no.finn.android.contentprovider;
import android.content.ContentResolver;
import android.database.ContentObserver;
import android.database.Cursor;
import android.net.Uri;
import android.os.Handler;
import android.os.Looper;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
View Implemented RxActivityDelegate.java
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
andaag / gist:b05ab66ed0f06167d6e0
Last active Apr 9, 2018
workaround for shareactionprovider leak
View gist:b05ab66ed0f06167d6e0
package no.finn.android.ui.objectpage;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import android.content.Context;
import android.content.Intent;
import android.support.v7.internal.widget.ActivityChooserModel;
import android.widget.ShareActionProvider;
@andaag
andaag / gist:ec1339635b5188a6b137
Last active Aug 29, 2015
generic serialization with logansquared
View gist:ec1339635b5188a6b137
public class GenericTypeConverter implements TypeConverter<GenericTypeConverter.GenericType> {
@Override
public GenericType parse(JsonParser jsonParser) throws IOException {
String field = null;
String value = null;
String fieldType = null;
String data = null;
View gist:2803af6f7f69548345ff
#!/bin/bash
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 no.finn.android.ci &>/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
You can’t perform that action at this time.