Skip to content

Instantly share code, notes, and snippets.

View vindolin's full-sized avatar
:octocat:
Available for hire 😎

Thomas Schüßler vindolin

:octocat:
Available for hire 😎
View GitHub Profile
// ==UserScript==
// @name Colorize Ansi Codes
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Colorize the ANSI codes in a HTML element.
// @author You
// @match http://pi4:9001/tail.html*
// @icon https://www.google.com/s2/favicons?sz=64&domain=githubusercontent.com
// @grant none
// @require https://gist.githubusercontent.com/vindolin/4a5dc01877b9531da39b30646dd882a3/raw/164473bdec4b3b17fd6455a4741f5d1a4e31c5b6/ansicolor.js
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:riverpod_annotation/riverpod_annotation.dart';
part 'fake_test.g.dart';
@riverpod
class TheNumber extends _$TheNumber {
@override
@vindolin
vindolin / main.dart
Last active February 6, 2023 08:57
Animated CustomPainter + Riverpod
// ignore_for_file: avoid_print
import 'dart:math';
import 'package:flutter/material.dart';
import 'package:flutter_hooks/flutter_hooks.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
void main() {
runApp(
const ProviderScope(
child: MyApp(),
@vindolin
vindolin / main.dart
Last active February 5, 2023 15:25
Riverpod Animation Problem
// ignore_for_file: avoid_print
import 'dart:math';
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
void main() {
runApp(
const ProviderScope(
child: MyApp(),
),
@vindolin
vindolin / main.dart
Last active October 7, 2022 08:11
Blink Problem
import 'dart:async';
import 'dart:math';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
const int minTimerDurationMs = 700;
const int maxTimerDurationMs = 2000;
const int animationDurationMs = 1000;
class FlashingCard extends StatefulWidget {
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Based on Martin Wolkers (Neolker) Name Tag Generator from: *
* https://www.printables.com/model/98717-name-tag-generator-for-christmas-gifts *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
name = "Keyfob"; // The text you want to print
$fn = 255; // Quality of render, use this for final render
// $fn = 50; // Quality of render, use this for dev
const IPAddress ip(192, 168, 178, 9);
const IPAddress router(192, 168, 178, 1);
void setup() {
WiFi.persistent(false);
WiFi.mode(WIFI_STA);
WiFi.config(ip, router, router);
WiFi.begin(SSID, PASSWORD);
}
@vindolin
vindolin / ir_babelfish.ino
Last active March 9, 2023 07:29
Arduino IR Babelfish
// This sketch translates incoming IR codes from a front facing IR receiver to an IR LED on the back of the device.
// I'm using it to controll my Edifier sound system with my Samsung TV remote control.
#include <IRremote.h> // https://github.com/z3t0/Arduino-IRremote
const int RECV_PIN = 4; // attach 1838 IR receiver to this pin
const int LED_PIN = 13; // attach an LED to this pin as a monitor
// the send pin is depending on the timer the library is using, for the nano it's 9
// see: https://github.com/z3t0/Arduino-IRremote/blob/master/boarddefs.h#L67
<div class="typeahead-container">
<div class="typeahead-field">
<span class="typeahead-query">
<input id="meinpaket_category" name="meinpaket_category" type="search" placeholder="Meinmaket Kategorie" autocomplete="off" value="Technik &amp; Unterhaltung &gt; Musik &gt; Alternative &gt; Gothic &amp; Wave">
<input id="meinpaket_category_id" name="meinpaket_category_id" type="hidden" value="1.8.1.4">
</span>
</div>
</div>
<script>
@vindolin
vindolin / flashair_watcher.py
Last active January 25, 2016 12:27
Watch a directory for .x3g files and post them to a flashair sc card.
moved to: https://github.com/vindolin/flashair_sync