Skip to content

Instantly share code, notes, and snippets.

View IonutNegru87's full-sized avatar

Negru Ionut Valentin IonutNegru87

  • @accesa.eu
  • Iasi
View GitHub Profile
@BramYeh
BramYeh / LowercaseEnumTypeAdapterFactory
Created March 28, 2017 13:11
LowercaseEnumTypeAdapterFactory
public class LowercaseEnumTypeAdapterFactory implements TypeAdapterFactory {
public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) {
Class<T> rawType = (Class<T>) type.getRawType();
if (!rawType.isEnum()) {
return null;
}
final Map<String, T> lowercaseToConstant = new HashMap<String, T>();
for (T constant : rawType.getEnumConstants()) {
lowercaseToConstant.put(toLowercase(constant), constant);
@Pulimet
Pulimet / AdbCommands
Last active July 23, 2024 18:05
Adb useful commands list
adb help // List all comands
== Adb Server
adb kill-server
adb start-server
== Adb Reboot
adb reboot
adb reboot recovery
adb reboot-bootloader
@lboulard
lboulard / README.md
Last active July 12, 2022 07:35
Command line ANDROID SDK in Linux

Android SDK will be installed in $HOME/.local/share/android/sdk.

On page https://developer.android.com/studio/index.html#downloads, got to section "Get just the command line tools" at page end and download Linux package. With last edition of this document, this is commandlinetools-linux-8092744_latest.zip.

export ANDROID_SDK_ROOT=$HOME/.local/share/android/sdk
export ANDROID_NDK_HOME=$ANDROID_SDK_ROOT/ndk-bundle
mkdir -p $ANDROID_SDK_ROOT
ffmpeg -y -i video.webm -vf palettegen palette.png
ffmpeg -y -i video.webm -i palette.png -filter_complex paletteuse -r 10 animation.gif
Source: http://www.ubuntubuzz.com/2017/08/convert-mp4-webm-video-to-gif-using-ffmpeg.html