Skip to content

Instantly share code, notes, and snippets.

View frankkienl's full-sized avatar
🤖
making Android apps

Frank Bouwens frankkienl

🤖
making Android apps
View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@frankkienl
frankkienl / arduino_led_matrix_8x8.ino
Created July 4, 2021 18:41
Arduino 8x8 led matrix
// Base64 - Version: Latest
#include <Base64.h>
//#include <base64.hpp>
// FastLED - Version: Latest
#include <FastLED.h>
#define LED_PIN 2
#define MATRIX_WIDTH 8
#define MATRIX_HEIGHT 8
#define NUM_LEDS 64

Android API levels

Let's talk about:

  • The difference between minSdkVersion and targetSdkVersion
  • What minSdkVersion and targetSdkVersion should we use?

minSdkVersion and targetSdkVersion

@frankkienl
frankkienl / Countries.java
Last active November 1, 2024 14:01
List of countries
/*
The Spotify API call, 'top-tracks' requires a ISO 3166-1 alpha-2 country code
//https://developer.spotify.com/web-api/get-artists-top-tracks/
//https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
//https://www.spotify.com/nl/legal/end-user-agreement/plain/#s19
//EU is not included in this list, as it generates this error:
{
"error": {
"status": 400,
"message": "Invalid country code"
@frankkienl
frankkienl / conventions.md
Last active November 3, 2022 09:56
Conventions list

Convention Calendar

Date Name Location
21-22 mei EponaFest Milano, Italy
---------------- -------------------------------------- ---------------
4-5 Juni Dokomi Germany
10-12 juni Animecon broodjesfabriek
18-19 juni fabel and fantasy
@frankkienl
frankkienl / Main.kt
Last active September 4, 2022 18:18
Words that end with 'tal'
fun main(args: Array<String>) {
val regex = ".{1,}tal$"
val filename = "english-words.txt"
processFile(filename, regex)
}
fun processFile(filename: String, regexString: String) {
val inputStream = object {}.javaClass.getResourceAsStream(filename) ?: return
val lines = inputStream.bufferedReader().readLines()
val regex = Regex(regexString, RegexOption.IGNORE_CASE)
@frankkienl
frankkienl / fish-tank.md
Created August 10, 2022 08:42
Water flow in aquaponics system

Water flow in aquaponics project

stateDiagram-v2
    Filter1: Filter met stenen
    Filter2: Filter met actieve koolstof
    Filter3: Filter met UVC
    note right of Filter3
      UVC dood bacterieën, maar is gevaarlijk!
      Zorg dat het licht alleen op het water schijnt.
 end note
@frankkienl
frankkienl / sketch_rgb_matrix_serial
Created February 4, 2022 14:33
Arduino rgb matrix via serial
// Base64 - Version: Latest
#include <Base64.h>
//#include <base64.hpp>
// FastLED - Version: Latest
#include <FastLED.h>
#define LED_PIN 2
#define MATRIX_WIDTH 8
#define MATRIX_HEIGHT 8
// #define NUM_LEDS 64
@frankkienl
frankkienl / androidauto.log
Created July 6, 2020 14:20
Crash in Android Auto
2020-07-06 16:19:16.323 3846-5645/? E/Parcel: Class not found when unmarshalling: com.google.android.gms.carsetup.BinderParcel
java.lang.ClassNotFoundException: com.google.android.gms.carsetup.BinderParcel
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:453)
at android.os.Parcel.readParcelableCreator(Parcel.java:2843)
at android.os.Parcel.readParcelable(Parcel.java:2797)
at android.os.Parcel.readValue(Parcel.java:2700)
at android.os.Parcel.readArrayMapInternal(Parcel.java:3067)
at android.os.BaseBundle.unparcel(BaseBundle.java:257)
at android.os.BaseBundle.getString(BaseBundle.java:1086)
@frankkienl
frankkienl / index.js
Created June 19, 2018 12:09
Call Firestore with Firebase Functions triggered by Storage
//Import libraries
const functions = require("firebase-functions");
const admin = require("firebase-admin");
//init
admin.initializeApp();
const firestore = admin.firestore();
//Create a function that is triggered by Storage
//https://firebase.google.com/docs/storage/extend-with-functions#trigger_a_function_on_changes