Skip to content

Instantly share code, notes, and snippets.

View knaeckeKami's full-sized avatar

Martin Kamleithner knaeckeKami

View GitHub Profile
@knaeckeKami
knaeckeKami / main.dart
Created November 26, 2023 21:03
iridescent-tundra-1306
import 'dart:math';
import 'package:flutter/material.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
typedef User = ({String id, String firstName, String lastName});
// some future provider that holds some value
final userProvider = FutureProvider((ref) async {
await Future.delayed(Duration(milliseconds: 200));
@knaeckeKami
knaeckeKami / main.dart
Created November 25, 2023 21:50
iridescent-tundra-1306
import 'dart:math';
import 'package:flutter/material.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
const Color darkBlue = Color.fromARGB(255, 18, 32, 47);
// some future provider that holds some value
final sourceProvider = FutureProvider((ref) async {
await Future.delayed(Duration(seconds: 1));
@knaeckeKami
knaeckeKami / main.dart
Created November 25, 2023 21:46
iridescent-tundra-1306
import 'dart:math';
import 'package:flutter/material.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
const Color darkBlue = Color.fromARGB(255, 18, 32, 47);
final sourceProvider = FutureProvider((ref) async {
await Future.delayed(Duration(seconds: 1));
@knaeckeKami
knaeckeKami / main.dart
Created November 25, 2023 21:39
iridescent-tundra-1306
import 'dart:math';
import 'package:flutter/material.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
const Color darkBlue = Color.fromARGB(255, 18, 32, 47);
final sourceProvider = FutureProvider((ref) async {
await Future.delayed(Duration(seconds: 1));
This file has been truncated, but you can view the full file.
/******************************************************************************
** This file is an amalgamation of many separate C source files from SQLite
** version 3.43.1. By combining all the individual C code files into this
** single large file, the entire code can be compiled as a single translation
** unit. This allows many compilers to do optimizations that would not be
** possible if the files were compiled separately. Performance improvements
** of 5% or more are commonly seen when SQLite is compiled as a single
** translation unit.
**
** This file is all you need to compile SQLite. To use SQLite in other
@knaeckeKami
knaeckeKami / main.dart
Last active August 15, 2023 19:41
astonishing-spray-1411
import 'dart:math';
import 'dart:ui';
import 'package:flutter/material.dart';
import 'package:flutter_hooks/flutter_hooks.dart';
void main() {
runApp(const MyApp());
}
@knaeckeKami
knaeckeKami / main.dart
Created August 14, 2023 10:40
silent-ritual-3131
import 'package:flutter/material.dart';
import 'dart:math' as math;
import 'dart:ui' as ui;
const Color darkBlue = Color.fromARGB(255, 18, 32, 47);
void main() {
runApp(MyApp());
}
@knaeckeKami
knaeckeKami / main.dart
Created June 27, 2023 14:42
astonishing-spray-1411
extension Let<T extends Object> on T? {
S? let<S>(S Function(T) f) {
final self = this;
if(self == null){
return null;
}
return f(self);
@knaeckeKami
knaeckeKami / script.sh
Created June 26, 2023 19:39
check_if_commits.sh
BRANCH=refs/remotes/origin/main
LAST_REV=$(git rev-parse --verify $BRANCH)
LAST_TAG=$(git describe --tag --abbrev=0 $LAST_REV)
COMMIT_COUNT=$(git rev-list --count $BRANCH $LAST_TAG..)
if [ $COMMIT_COUNT = 0 ]; then
echo "Nothing to build! No commits since $LAST_TAG on $BRANCH."
exit 0;
@knaeckeKami
knaeckeKami / main.dart
Created April 4, 2023 14:32
silent-ritual-3131
import 'package:flutter/material.dart';
const Color darkBlue = Color.fromARGB(255, 18, 32, 47);
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override