Skip to content

Instantly share code, notes, and snippets.

View paour's full-sized avatar

Pierre-Luc Paour paour

View GitHub Profile
@paour
paour / gist:6342932505e1fd24ab2b
Created December 11, 2014 17:42
Genymotion N4 5.0.0 startup
12-11 17:36:49.006 0-95/? E/Minikin﹕ addFont failed to create font /system/fonts/NotoSansGujarati-Regular.ttf
12-11 17:36:49.009 0-95/? E/Minikin﹕ addFont failed to create font /system/fonts/NotoSansGujarati-Bold.ttf
12-11 17:36:49.030 0-95/? E/Minikin﹕ addFont failed to create font /system/fonts/NotoSansGujaratiUI-Regular.ttf
12-11 17:36:49.032 0-95/? E/Minikin﹕ addFont failed to create font /system/fonts/NotoSansGujaratiUI-Bold.ttf
12-11 17:36:49.043 0-95/? E/Minikin﹕ addFont failed to create font /system/fonts/NotoSansGurmukhi-Regular.ttf
12-11 17:36:49.052 0-95/? E/Minikin﹕ addFont failed to create font /system/fonts/NotoSansGurmukhi-Bold.ttf
12-11 17:36:49.055 0-95/? E/Minikin﹕ addFont failed to create font /system/fonts/NotoSansGurmukhiUI-Regular.ttf
12-11 17:36:49.059 0-95/? E/Minikin﹕ addFont failed to create font /system/fonts/NotoSansGurmukhiUI-Bold.ttf
12-11 17:36:49.625 0-95/? E/Minikin﹕ addFont failed to create font /system/f
@paour
paour / iap_google_vat.py
Last active November 5, 2023 22:09
Update a pre-Euro VAT Play Store IAP export to add VAT
# coding=utf-8
import csv
import re
import json
import urllib2
def unicode_csv_reader(unicode_csv_data, dialect=csv.excel, **kwargs):
# csv.py doesn't do Unicode; encode temporarily as UTF-8:
csv_reader = csv.reader(utf_8_encoder(unicode_csv_data),
#!/bin/bash -x
# How to install:
# exo-open "http://developer.android.com/sdk/index.html#Other"
# brew install libav-tools imagemagick ffmpeg
# wget https://gist.githubusercontent.com/paour/0e0454ea63cbe19e91ac/raw/android-screen-to-gif.sh
# chmod a+x android-screen-to-gif.sh
# Help message
function usage() {
class ReverseProxyDispatcher extends Dispatcher {
private final OkHttpClient client;
private final HttpUrl serverUrl;
public ReverseProxyDispatcher(HttpUrl url) {
serverUrl = url;
client = new OkHttpClient.Builder().build();
}
@Override
@paour
paour / ReverseProxyDispatcher.java
Created October 14, 2016 07:40
An OkHttp MockWebServer dispatcher that makes it possible to proxy requests to an upstream server while checking the request and response in tests.
interface ReverseProxyValidator {
void validate(RecordedRequest request, Response response);
}
class ReverseProxyDispatcher extends Dispatcher {
private final OkHttpClient client;
private final HttpUrl serverUrl;
private final ReverseProxyValidator validator;
public ReverseProxyDispatcher(HttpUrl url, ReverseProxyValidator validator) {
@paour
paour / ColorPreferenceCompat.java
Created September 23, 2017 11:03
A slight modification of the `ColorPreference` class from https://github.com/jaredrummler/ColorPicker, which can be used with the Preference compat library. https://github.com/jaredrummler/ColorPicker/issues/26
/*
* Copyright (C) 2017 Jared Rummler
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@paour
paour / react-native-carousel-view+0.5.1.patch
Created September 26, 2019 12:19
A patch to switch to RNCViewPager.
#!/bin/bash
set -ex
source /etc/os-release
declare -A packages
declare -i installed=0
packages[htop]=https://github.com/mback2k/torcx-htop/releases/download/3.0.3-1/torcx.tgz
packages[qemu-ga]=https://github.com/mback2k/torcx-qemu-ga/releases/download/5.0.2-2/torcx.tgz