This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# open your flashinvader android application on your phone to retreive your uid | |
uid=$(adb logcat -d | grep 'api.space-invaders' | sed -n 's/.*uid=\([^ ]*\).*/\1/p' | head -n 1) | |
# display a flat array of flashed invaders | |
curl -s https://api.space-invaders.com/flashinvaders_v3_pas_trop_predictif/api/gallery?uid=$uid | jq -c '[.invaders | to_entries | map(.value.name)] | flatten' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/com/archos/filecorelibrary/FileEditor.java b/src/com/archos/filecorelibrary/FileEditor.java | |
index d34a879..76d880b 100644 | |
--- a/src/com/archos/filecorelibrary/FileEditor.java | |
+++ b/src/com/archos/filecorelibrary/FileEditor.java | |
@@ -52,6 +52,7 @@ public abstract class FileEditor { | |
public boolean rename(String newName) { return false; }; | |
public boolean move(Uri uri) { return false; }; | |
public abstract boolean exists(); | |
+ public long length() throws Exception { return -1; } | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.courville.sardinetest; | |
import com.github.sardine.*; | |
import java.io.IOException; | |
import java.util.List; | |
public class Main { | |
public static void main(String[] args) { | |
// arguments are: user password url |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- next episode in show and movie in collection to watch | |
-- note: faster with union | |
WITH v AS | |
(SELECT video_online_id, scraper_name, m_coll_id, m_year, s_id, e_season, e_episode, MAX(archos_lasttimeplayed) AS archos_lasttimeplayed | |
FROM video WHERE (m_coll_id NOT NULL OR s_id NOT NULL) AND Archos_lastTimePlayed=0 AND archos_hiddenbyuser = 0 GROUP BY video_online_id), | |
l AS | |
(SELECT m_coll_id, s_id, MAX(e_season) AS e_season, max(e_episode) AS e_episode, MAX(archos_lasttimeplayed) AS archos_lasttimeplayed, MAX(m_year) AS m_year | |
FROM video WHERE Archos_lastTimePlayed!=0 AND (m_coll_id NOT NULL OR s_id NOT NULL) AND archos_hiddenbyuser = 0 GROUP BY m_coll_id, s_id, e_season LIMIT 100) | |
SELECT v.video_online_id, v.scraper_name, v.e_season, v.e_episode, l.archos_lasttimeplayed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# API= your tmdb API key | |
# all lang except en | |
LANG=$(curl -s https://api.themoviedb.org/3/configuration/languages\?api_key=${API} | jq | grep iso_639_1 | sed 's/^.*"iso_639_1": "\([a-z][a-z]\).*$/\1/g' | grep -v en | sort -u) | |
for lang in $LANG | |
do | |
curl -s https://api.themoviedb.org/3/genre/movie/list\?api_key=${API}\&language=${lang} | jq | grep \"name\": | grep -v null | sed 's/^.*"name": "\([^"]*\)"/\1/g' > result-$lang |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
[ ! -d "opus" ] && git clone https://github.com/xiph/opus.git | |
# latest cmake and ndk | |
CMAKE_PATH=$(ls -d ${ANDROID_HOME}/cmake/* | sort -V | tail -n 1) | |
echo CMAKE_PATH is ${CMAKE_PATH} | |
NDK_PATH=$(ls -d ${ANDROID_HOME}/ndk/* | sort -V | tail -n 1) | |
echo NDK_PATH is ${NDK_PATH} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
git clone https://github.com/xiph/opus.git | |
CMAKE_PATH=/opt/android-sdk/cmake/3.10.2.4988404 | |
NDK_PATH=/opt/android-sdk/ndk/21.3.6528147 | |
API_LEVEL=21 | |
for ABI in armeabi-v7a arm64-v8a x86 x86_64 | |
do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/build.sh b/build.sh | |
index 817c996..c15891b 100755 | |
--- a/build.sh | |
+++ b/build.sh | |
@@ -1,4 +1,4 @@ | |
-#!/bin/bash | |
+#!/bin/bash -x | |
while getopts "a:c:" opt; do | |
case $opt in |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.BufferedReader; | |
import java.io.File; | |
import java.io.FileReader; | |
import java.io.InputStreamReader; | |
import java.util.Locale; | |
import java.util.regex.Matcher; | |
import java.util.regex.Pattern; | |
// TODO: add MoviePathMatcher | |
// TODO: add TvShowPathMatcher |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private AlertDialog alertDialog = null; | |
private ProgressBar progressBar = null; | |
private TextView textView = null; | |
public void displaySimpleDialog(Context context, boolean isSpinner, String dialogText, int progress, int maxProgress) { | |
if (alertDialog == null) { // init part | |
AlertDialog.Builder builder = new AlertDialog.Builder(context); | |
builder.setOnCancelListener(dialog -> { | |
dialog.cancel(); | |
// do cleaning stuff |
NewerOlder