Skip to content

Instantly share code, notes, and snippets.

mediavrog /
Last active Jan 14, 2022
Android Compatibility popup menu with icons (requires support library v7)
* Seems like the only way to use it currently (as of 10/2018) is through reflection
* see
package com.vuzz.snapdish.ui;
import android.content.Context;
mediavrog / gist:49c4f809dffea4e00738a7f5e3bbfa59
Last active Mar 22, 2021
CORS in Google Cloud Functions for Firebase
View gist:49c4f809dffea4e00738a7f5e3bbfa59
const cors = require('cors')({origin: true});
exports.sample = functions.https.onRequest((req, res) => {
cors(req, res, () => {
mediavrog / gist:5625602
Last active Dec 1, 2020
Filter out Intents you don"t want to show from a IntentChooser dialog. For example your own app, competing apps or just apps you have a share integration by SDK already :) Based on
View gist:5625602
// Usage:
// blacklist
String[] blacklist = new String[]{"com.any.package", "net.other.package"};
// your share intent
Intent intent = new Intent(Intent.ACTION_SEND);
intent.putExtra(Intent.EXTRA_TEXT, "some text");
intent.putExtra(android.content.Intent.EXTRA_SUBJECT, "a subject");
// ... anything else you want to add
// invoke custom chooser
mediavrog /
Last active Aug 26, 2020
Simple string conversion from Hiragana to Katakana and vice versa. Uses the JapaneseCharacter class from Duane J. May and combines it with a simple Utility class method to perform the actual conversion.
* JapaneseCharacter contains static functions to do various tests
* on characters to determine if it is one of the various types of
* characters used in the japanese writing system.
* <p/>
* There are also a functions to translate between Katakana, Hiragana,
* and Romaji.
* @author Duane J. May <>
* @version $Id:,v 1.2 2002/04/20 18:10:24 djmay Exp $
mediavrog / EditText.xml
Created Jun 4, 2014
Cursor not visible in EditText in Jelly Bean - this happens if you set a background for the field; to fix it, set the cursorDrawable to @null. Always use this combination when using custom backgrounds.
View EditText.xml
android:textCursorDrawable="@null" />
mediavrog / main.js
Created Oct 24, 2016
Simple bootstrapping for a VueJS app with I18n, Routing and http client
View main.js
// VueJS with Router, I18n and simple http client
import Vue from "vue"
import VueI18n from "vue-i18n"
import VueRouter from "vue-router"
import VueResource from 'vue-resource'
// 2 pages for the app states
import Splash from "./pages/Splash.vue"
import Main from "./pages/Main.vue"
import App from "./App.vue"
// i18n strings
mediavrog / compile-volley
Created Aug 22, 2013
Compile Google Volley to JAR
View compile-volley
$ git clone
$ cd volley
$ android update project -p .
$ ant jar
// Then, copy bin/volley.jar into your libs/ folder and off you go!
mediavrog /
Created May 1, 2017
Default issue template at AIR

Expected behaviour

Actual behaviour

Steps to reproduce the behaviour

mediavrog /
Last active May 1, 2017
Default Pull Request template for AIR.

Fixes #

Changes proposed in this PR

Review requested by @