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
//Andon's Color Badge basic program.
//Utilizes the ST7735 driver from Adafruit and the Adafruit Graphics Library
//Documentation can be found here: https://learn.adafruit.com/adafruit-gfx-graphics-library/graphics-primitives
//Due to size constraints (And my own coding abilities), no SD card interactions are programmed in.
//However, the standard SD card library can be used. I've added the SD card chip select pin below for reference.
#include <Adafruit_GFX.h> // Core graphics library
#include <Adafruit_ST7735.h> // Hardware-specific library
#include <SPI.h>
@frankkienl
frankkienl / aDarkRoomNotifierForTamperMonkey.js
Created September 6, 2016 12:17
Give notifications when A Dark Room's Gather button should be clicked again
// ==UserScript==
// @name A Dark Room notifier
// @namespace http://adarkroom.doublespeakgames.com/
// @version 0.1
// @description try to take over the world!
// @author You
// @match http://adarkroom.doublespeakgames.com/
// @grant none
// ==/UserScript==
@frankkienl
frankkienl / RetrofitBug.java
Created September 22, 2017 14:50
Retrofit bug, exception on http201 with empty body
package nl.frankkie.retrofitbug;
import org.junit.Rule;
import org.junit.Test;
import okhttp3.ResponseBody;
import okhttp3.mockwebserver.MockResponse;
import okhttp3.mockwebserver.MockWebServer;
import retrofit2.Call;
import retrofit2.Callback;
@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
@frankkienl
frankkienl / song.txt
Last active January 18, 2020 21:26
Heaven can't wait
#ENCODING:UTF8
#TITLE:Heaven can't wait
#ARTIST:Heaven can't wait
#LANGUAGE:English
#MP3:Heaven can't wait.mp3
#BPM:520
#GAP:0
: 16 16 19 Bro
: 32 32 21 thers,
: 76 20 19 sis
@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)
import 'package:audioplayers/audio_cache.dart';
import 'package:audioplayers/audioplayers.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@frankkienl
frankkienl / CarNotifications.kt
Created November 26, 2020 09:37
CarExtender vs CarAppExtender
val ce = NotificationCompat.CarExtender()
ce.setColor() // <-- method exists
val cae = CarAppExtender.builder()
cae.setColor() // <-- method does **not** exist
@frankkienl
frankkienl / MatrixToBase64.kt
Created July 4, 2021 18:33
Led Matrix 8x8 to Base64
import java.awt.Color
import java.io.File
import java.util.*
import javax.imageio.ImageIO
import kotlin.system.exitProcess
fun main(args: Array<String>) {
if (args.isEmpty()) {
printHelp()
exitProcess(0)
@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