Skip to content

Instantly share code, notes, and snippets.

View paour's full-sized avatar

Pierre-Luc Paour paour

View GitHub Profile
#!/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
@paour
paour / react-native-carousel-view+0.5.1.patch
Created September 26, 2019 12:19
A patch to switch to RNCViewPager.
@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 / 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) {
class ReverseProxyDispatcher extends Dispatcher {
private final OkHttpClient client;
private final HttpUrl serverUrl;
public ReverseProxyDispatcher(HttpUrl url) {
serverUrl = url;
client = new OkHttpClient.Builder().build();
}
@Override
#!/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() {
@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),
@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 / gist:d817f930fa8675adf637
Created September 18, 2014 07:42
Keybase proof
### Keybase proof
I hereby claim:
* I am paour on github.
* I am paour (https://keybase.io/paour) on keybase.
* I have a public key whose fingerprint is A400 021D 4B81 9184 B98D 3F08 9615 F14C 0898 1094
To claim this, I am signing this object:
ACTION_ACCESSIBILITY_FOCUS]
06-14 09:07:46.465 13395-13395/com.lastpass.lpandroid E/AccessibilityNodeInfoCache﹕ Disconneced node: android.view.accessibility.AccessibilityNodeInfo@16d782; boundsInParent: Rect(541, 3 - 602, 35); boundsInScreen: Rect(389, -44 - 433, -21); packageName: mobi.mgeek.TunnyBrowser; className: android.view.View; text: null; contentDescription: SPORT Link; viewIdResName: null; checkable: false; checked: false; focusable: true; focused: false; selected: false; clickable: true; longClickable: false; enabled: true; password: false; scrollable: false; [ACTION_FOCUS, ACTION_CLICK, ACTION_ACCESSIBILITY_FOCUS]
06-14 09:07:46.465 13395-13395/com.lastpass.lpandroid E/AccessibilityNodeInfoCache﹕ Disconneced node: android.view.accessibility.AccessibilityNodeInfo@16d7c0; boundsInParent: Rect(601, 3 - 679, 35); boundsInScreen: Rect(432, -44 - 488, -21); packageName: mobi.mgeek.TunnyBrowser; className: android.view.View; text: null; contentDescription: SCIENCES Link; viewIdResName: null; checkable: