Skip to content

Instantly share code, notes, and snippets.

View mediavrog's full-sized avatar

Maik B mediavrog

  • @shackersNFT
  • Germany / Japan
View GitHub Profile
@mediavrog
mediavrog / compile-volley
Created August 22, 2013 02:21
Compile Google Volley to JAR
$ git clone https://android.googlesource.com/platform/frameworks/volley
$ cd volley
$ android update project -p .
$ ant jar
// Then, copy bin/volley.jar into your libs/ folder and off you go!
@mediavrog
mediavrog / README.md
Last active May 1, 2017 08:27
Default Readme.me template at AIR
@mediavrog
mediavrog / issue_template.md
Created May 1, 2017 08:01
Default issue template at AIR

Expected behaviour

Actual behaviour

Steps to reproduce the behaviour

@mediavrog
mediavrog / PULL_REQUEST_TEMPLATE.md
Last active May 1, 2017 07:57
Default Pull Request template for AIR.

Fixes #

Changes proposed in this PR

Review requested by @

@mediavrog
mediavrog / enable-volley-verbose-logging
Last active March 26, 2017 16:58
Enable verbose logging in Google Volley networking library
# (42f63b0de7318fe1 is a device id)
adb -s 42f63b0de7318fe1 shell setprop log.tag.Volley VERBOSE
@mediavrog
mediavrog / DecoratedRequestQueue.java
Created October 23, 2013 09:27
Make Volley RequestQueue / ThreadPool work with Espresso Testing library
package com.vuzz.snapdish.test.functional;
import android.os.Handler;
import com.android.volley.Cache;
import com.android.volley.Request;
import com.android.volley.RequestQueue;
import com.google.android.apps.common.testing.ui.espresso.contrib.CountingIdlingResource;
/**
* A dummy request queue which enables us to use the Volley Library properly with Espresso.
package com.yokogoshi.line_intent_test;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.List;
Regex for matching ALL Japanese common & uncommon Kanji (4e00 – 9fcf) ~ The Big Kahuna!
([一-龯])
Regex for matching Hirgana or Katakana
([ぁ-んァ-ン])
Regex for matching Non-Hirgana or Non-Katakana
([^ぁ-んァ-ン])
Regex for matching Hirgana or Katakana or basic punctuation (、。’)
package es.cloudey.pagespeed.util;
import java.util.HashMap;
import java.util.Map;
import android.os.Bundle;
import android.os.Parcelable;
public class CollectionUtils {
public static Bundle toBundle(Map<String, ? extends Parcelable> input) {
@mediavrog
mediavrog / analytics.coffee
Last active August 26, 2016 03:33
Javascript / Coffeescript snipped to use Google Analytics with Turbolinks in Rails 4
# add the tracking code normally to your layout; then include this in every page
$(document).on 'page:change', ->
if window.ga?
ga('send', 'pageview');
else if window._gaq?
_gaq.push(['_trackPageview'])
else if window.pageTracker?
pageTracker._trackPageview()