Skip to content

Instantly share code, notes, and snippets.

View JannieT's full-sized avatar

Jannie Theunissen JannieT

View GitHub Profile
@JannieT
JannieT / main.dart
Last active October 8, 2024 11:34
Signal Issue
import 'package:flutter/material.dart';
import 'package:signals/signals_flutter.dart';
void main() {
runApp(const CheckApp());
}
class CheckApp extends StatelessWidget {
const CheckApp({super.key});
@JannieT
JannieT / calendar.py
Last active January 10, 2022 05:22
MagTag Calendar
import rtc
import time
import board
from adafruit_magtag.magtag import MagTag
from adafruit_oauth2 import OAuth2
from adafruit_bitmap_font import bitmap_font
from adafruit_display_text import label
class Calendar:
> Having trouble rendering njk template ./src/home.njk
`TemplateContentRenderError` was thrown
> (./src/home.njk)
Error: Input data should be a String
`Template render error` was thrown:
Template render error: (./src/home.njk)
Error: Input data should be a String
at Object._prettifyError (/Users/jannie/Sites/bioy-marketing/node_modules/nunjucks/src/lib.js:36:11)
@JannieT
JannieT / manifest.json
Created September 28, 2020 15:12
Azure authentication app manifest
{
"id": "7f8f86dd-e4f3-4eac-9e6e-ef86499091fa",
"acceptMappedClaims": null,
"accessTokenAcceptedVersion": null,
"addIns": [],
"allowPublicClient": false,
"appId": "1a5ca037-2dca-4a8b-a465-f088ca2e8cc4",
"appRoles": [],
"oauth2AllowUrlPathMatching": false,
"createdDateTime": "2020-09-28T11:13:03Z",
import 'dart:async';
Future main() async {
print('start');
final futures = <Future>[
fetchLong(),
fetchShort(),
];
# Redirect every request to HTTPS...
server {
listen 80;
listen [::]:80;
server_name .example.com;
return 301 https://$host$request_uri;
}
# Redirect SSL to primary domain SSL...
@JannieT
JannieT / backend.js
Last active December 28, 2018 19:23
const uccf = new function() {
let extrasAdded = false;
let config = null;
let editor = null;
this.init = function() {
if (
typeof CKEDITOR == "undefined" ||
!CKEDITOR.instances.hasOwnProperty("body")
)
@JannieT
JannieT / Source.php
Last active April 23, 2018 07:45
Sample php script to populate a mysql databse from a sqlite database
<?php
class Source
{
const CONNECTION = 'sqlite:pim6.sqlite';
private $db;
public function __construct()
@JannieT
JannieT / droid_set_version.targets
Last active January 25, 2019 12:02
Xamarin Multiplatform App Version Synchronization
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<UsingTask TaskName="Increment" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.Core.dll">
<ParameterGroup>
<Number ParameterType="System.Int64" Required="true"/>
<Incremented ParameterType="System.Int64" Output="true"/>
</ParameterGroup>
<Task>
<Code Type="Fragment" Language="cs">
Incremented = Number + 1;
@JannieT
JannieT / AndroidLocale.cs
Created May 2, 2017 06:58
Xamarin.Forms localization when using a shared project
namespace Langham
{
public class AndroidLocale : Locale
{
public AndroidLocale() : base()
{
}
public override void ApplyLocale()