Skip to content

Instantly share code, notes, and snippets.

Avatar

rekire

View GitHub Profile
@rekire
rekire / url_parser.dart
Created March 28, 2022 20:33
A very simple url parser for RichText written in dart
View url_parser.dart
static int findEnd(String string, int start) {
int index = string.indexOf(">", start);
if (index == -1) {
return string.length -1;
} else {
return index;
}
}
static List<TextSpan> parseHtml(String html) {
@rekire
rekire / request.json
Created May 9, 2018 12:16
The fulfillment request of Dialogflow of an Actions on Google request.
View request.json
{
"originalRequest": {
"data": {
"isInSandbox": true,
"surface": {
"capabilities": [ // Wear OS (former Android Wear)
{
"name": "actions.capability.SCREEN_OUTPUT"
}
],
@rekire
rekire / listItem.json
Created January 10, 2018 18:46
Example of a list item for a Alexa ListTemplate
View listItem.json
{
"token": "cheese1",
"image": {
"contentDescription": "desc1",
"sources": [
{
"url": "http://www.example.com/gouda.jpg"
}
]
},
@rekire
rekire / ListTemplate2.json
Created January 10, 2018 15:59
Example JSON for the ListTemplate2
View ListTemplate2.json
{
"version": "1.0",
"sessionAttributes": {},
"response": {
"outputSpeech": {
"type": "PlainText",
"text": "Hallo",
"ssml": "<speak>Hallo</speak>"
},
"reprompt": {
@rekire
rekire / FirebaseAnalytics.java
Created February 12, 2017 16:13
Firebase analytics mock.
View FirebaseAnalytics.java
package com.google.firebase.analytics;
import android.content.Context;
import android.os.Bundle;
import android.util.Log;
/**
* Created by René Kilczan on 12.02.17.
*/
public class FirebaseAnalytics {
@rekire
rekire / FirebaseCrash.java
Created February 12, 2017 16:12
Firebase crash reporting mock.
View FirebaseCrash.java
package com.google.firebase.crash;
import android.util.Log;
/**
* Created by René Kilczan on 11.02.17.
*/
public class FirebaseCrash {
public static void log(String log) {
Log.d("FirebaseDebug", log);
@rekire
rekire / MeasureCallbackLayout.java
Created December 23, 2016 06:15
A small layout to observe measure calls to know when the layout dimentions are fixed.
View MeasureCallbackLayout.java
public class MeasureCallbackLayout extends FrameLayout {
private final List<MeasureCallback> listeners = new ArrayList<>();
private int width = -1;
private int height = -1;
public MeasureCallbackLayout(Context context) {
super(context);
}
public MeasureCallbackLayout(Context context, AttributeSet attrs) {
@rekire
rekire / Windows Deutsch.keylayout
Last active July 28, 2016 05:43
You are familar with a Windows Keyboard, but you have to use a Mac? No problem use this nice KeyMap with will fix the key mapping for you! Just copy this file to /Library/Keyboard Layouts/ and select in the system settings the "Windows Deutsch" keyboard layout.
View Windows Deutsch.keylayout
<?xml version="1.1" encoding="UTF-8"?>
<!DOCTYPE keyboard SYSTEM "file://localhost/System/Library/DTDs/KeyboardLayout.dtd">
<!--Last edited by Ukelele version 3.0.2.59 on 2016-06-30 at 22:02 (MESZ)-->
<keyboard group="6" id="19307" maxout="11" name="Windows Deutsch">
<layouts>
<layout first="0" last="4" mapSet="fb0" modifiers="84"/>
<layout first="5" last="5" mapSet="18c" modifiers="84"/>
<layout first="8" last="9" mapSet="18c" modifiers="84"/>
<layout first="13" last="13" mapSet="18c" modifiers="84"/>
</layouts>
@rekire
rekire / android23.tag
Created January 5, 2016 08:28
External Android documentation for any doxygen project that should link to the orginal Android documentation. Just link that file in the expert tab under external as TAGFILES entry.
View android23.tag
This file has been truncated, but you can view the full file.
<?xml version="1.0" encoding="UTF-8"?><tagfile>
<compound kind="class">
<name>org::apache::harmony::tests::java::util::support::A</name>
<filename>http://developer.android.com/reference/org/apache/harmony/tests/java/util/support/A.html</filename>
<base>org::apache::harmony::tests::java::util::support::I</base>
</compound>
<compound kind="class">
<name>com::android::settingslib::bluetooth::A2dpProfile</name>
<filename>http://developer.android.com/reference/com/android/settingslib/bluetooth/A2dpProfile.html</filename>
<base>com::android::settingslib::bluetooth::LocalBluetoothProfile</base>
@rekire
rekire / IterableSparseArray.java
Last active February 11, 2019 13:35
Customized SparseArray which allows using a iterator.
View IterableSparseArray.java
/**
* @copyright
* This code is licensed under the Rekisoft Public License.
* See http://www.rekisoft.eu/licenses/rkspl.html for more informations.
*/
/**
* @package eu.rekisoft.android.util
* This package contains utils provided by [rekisoft.eu](http://rekisoft.eu/).
*/
package eu.rekisoft.android.util;