Skip to content

Instantly share code, notes, and snippets.

@aveuiller
aveuiller / 9gag-autoscroll.js
Last active March 18, 2016 21:03
Browse 9gag without hands on keyboard
/*
Autoscroll your 9gag and save time!
*/
function NineGagAutoScroller() {
// User parameters
var AVG_TIME_PER_POST = 10000;
var TIME_TO_SCROLL_TO_NEXT_POST = 1500;
var TIME_TO_SCROLL_THROUGH_LONG_POST = 10000;
var TIME_BEFORE_SCROLLING_LONG_POST = 4000;
@aveuiller
aveuiller / packageAndroid.sh
Last active August 19, 2024 07:36
Extract the Android .odex files and package a new android.jar with the retrieved classes
#!/bin/sh
##
# Usage:
# ./convert.sh /path/to/framework /path/to/out $apiVersion $arch
#
# $arch is mandatory only in case of an ART system and defines the boot folder to use (arm, x86, x86_64).
##
frameworkDir=$1
# Final output directory
@aveuiller
aveuiller / allApps.csv
Last active August 24, 2017 13:24
Put together Tandoori's tools to provide an automated way of creating a developer smells summary
afwall ukanth/afwall
AmazeFileManager arpitkh96/AmazeFileManager
andFHEM klassm/andFHEM
android-cache-cleaner Frozen-Developers/android-cache-cleaner
Android-IMSI-Catcher-Detector CellularPrivacy/Android-IMSI-Catcher-Detector
Android-Password-Store zeapo/Android-Password-Store
Android-Remote clementine-player/Android-Remote
andstatus andstatus/andstatus
Anki-Android ankidroid/Anki-Android
AnyMemo helloworld1/AnyMemo
@aveuiller
aveuiller / Test.java
Created September 21, 2017 08:50
Configuration example to make script engine work with Android
package test.app;
import android.app.Activity;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.util.Log;
import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;
@aveuiller
aveuiller / apps_selection-select_projects.sh
Last active September 26, 2018 14:31
Tandoori helper scripts
#!/bin/bash
cat apps-todo.csv | wc -l^C
./finished_projects.sh > ../apps-selection/paprika-finished
cd -
cat paprika_finished | xargs -iX grep -e "^X," all.csv > apps-todo.csv
# Todo: create tandoori_finished
@aveuiller
aveuiller / advanced_controller_queries.sh
Last active January 20, 2021 22:31
medium_Spring_Boot_Apprentice_Cookbook
curl -i "localhost:8080/hello/jack?amount_exclamation=4"
HTTP/1.1 200
{"message":"Hello jack!!!!"}
# -d automatically creates a POST request.
$ curl -i "localhost:8080/hello" -d '{"name": "Bob"}' -H "Content-Type: application/json"
HTTP/1.1 200
{"message":"Hello Bob"}
@aveuiller
aveuiller / five_days_a_month_after.py
Created January 12, 2021 21:34
medium_flaky_tests
def current_time():
# Centralized method to retrieve the current datetime
return arrow.get()
def compute_stats():
# Compute some statistics about stored data
month = current_time().floor('month')
data = retrive_data(month)
return len(data)
@aveuiller
aveuiller / main_fully_injected.java
Last active January 12, 2021 21:59
medium_dependency_injection
public static void main(String[] args) {
// Creating the injection module configured above.
Injector injector = Guice.createInjector(new WeatherModule());
// We ask for the injection of a WeatherContract,
// which will create an instance of ThermometerContract
// with the named TemperatureUnit under the hood.
WeatherContract weather = injector.getInstance(WeatherContract.class);
}
@aveuiller
aveuiller / luci_getbuild_example.sh
Created March 2, 2021 09:50
LUCI ci.chromium.org
$ curl 'https://cr-buildbucket.appspot.com/prpc/buildbucket.v2.Builds/GetBuild' \
-H 'authority: cr-buildbucket.appspot.com' \
-H 'accept: application/json' \
-H 'dnt: 1' \
-H 'user-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.182 Safari/537.36' \
-H 'content-type: application/json' \
-H 'origin: https://ci.chromium.org' \
-H 'sec-fetch-site: cross-site' \
-H 'sec-fetch-mode: cors' \
-H 'sec-fetch-dest: empty' \
@aveuiller
aveuiller / 00_concepts_abstraction_table.md
Last active September 20, 2021 09:09
medium_Kubernetes_Apprentice_Cookbook
Abstraction Layer Physical Layer Uses Namespace Description
Pod Container A Pod is the minimal work unit of Kubernetes, it is generally equivalent to one applicative container but it can be composed of multiple ones.
Replicaset