Skip to content

Instantly share code, notes, and snippets.

View rekire's full-sized avatar

René Kilczan rekire

View GitHub Profile
@rekire
rekire / bus.c
Created March 13, 2024 21:13
My auto login linux sample code
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <libsecret/secret.h>
#define SERVICE_NAME "eu.rekisoft.flutter.autologin.example"
#define AUTOLOGIN_SCHEMA getAutologinSchema()
const SecretSchema* getAutologinSchema (void){
static const SecretSchema autologinSchema = {
@rekire
rekire / libsecret-password-demo.c
Created March 13, 2024 21:12
Sample implementation how to read and write credentials with lib secret
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <libsecret/secret.h>
#define SERVICE_NAME "your.service.name"
#define MY_SCHEMA getMySchema()
const SecretSchema* getMySchema (void){
static const SecretSchema mySchema = {
@rekire
rekire / main.dart
Created September 8, 2023 16:52
Demonstration of "my" keyboard bug
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatefulWidget {
const MyApp({super.key});
@override
@rekire
rekire / gist:e43738672cb9d2a243a55024fa4c59ee
Created August 15, 2023 08:23
Regex seach for useless overrides which just call super
\{\s+super\.[^)]+\);\s+}
@rekire
rekire / url_parser.dart
Created March 28, 2022 20:33
A very simple url parser for RichText written in 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.
{
"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
{
"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
{
"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.
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.
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);