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 com.codingbuffalo.aerialdream.util; | |
import android.os.Handler; | |
import android.support.annotation.UiThread; | |
import com.squareup.okhttp.OkHttpClient; | |
import com.squareup.okhttp.Request; | |
import com.squareup.okhttp.Response; | |
import java.io.File; |
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 android.annotation.TargetApi; | |
import android.content.Context; | |
import android.os.Build; | |
import android.util.AttributeSet; | |
import android.widget.ScrollView; | |
import android.widget.TextView; | |
import java.util.Locale; | |
public class LogView extends ScrollView { |
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 | |
# Based on http://blog.pkh.me/p/21-high-quality-gif-with-ffmpeg.html | |
# Requires ffmpeg | |
filename="${1%.*}" | |
palette="/tmp/palette.png" | |
filters="scale=320:-1:flags=lanczos" | |
ffmpeg -v warning -i "$1" -vf "$filters,palettegen" -y $palette | |
ffmpeg -v warning -i "$1" -i $palette -lavfi "$filters [x]; [x][1:v] paletteuse" -y "$filename.gif" |
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 'dart:convert'; | |
import 'package:firedart/firedart.dart'; | |
import 'package:shared_preferences/shared_preferences.dart'; | |
/// Stores tokens as preferences in Android and iOS. | |
/// Depends on the shared_preferences plugin: https://pub.dev/packages/shared_preferences | |
class PreferencesStore extends TokenStore { | |
static const keyToken = "auth_token"; |
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 'package:firedart/firedart.dart'; | |
import 'package:hive/hive.dart'; | |
/// Stores tokens using a Hive store. | |
/// Depends on the Hive plugin: https://pub.dev/packages/hive | |
class HiveStore extends TokenStore { | |
static const keyToken = "auth_token"; | |
static Future<HiveStore> create() async { | |
// Make sure you call both: |