Skip to content

Instantly share code, notes, and snippets.

View aloisdeniel's full-sized avatar
🤘
Flutter / Figma / Firebase rock!

Aloïs Deniel aloisdeniel

🤘
Flutter / Figma / Firebase rock!
View GitHub Profile
@gre
gre / easing.js
Last active June 13, 2024 12:18
Simple Easing Functions in Javascript - see https://github.com/gre/bezier-easing
/*
* This work is free. You can redistribute it and/or modify it under the
* terms of the Do What The Fuck You Want To Public License, Version 2,
* as published by Sam Hocevar. See the COPYING file for more details.
*/
/*
* Easing Functions - inspired from http://gizma.com/easing/
* only considering the t value for the range [0, 1] => [0, 1]
*/
EasingFunctions = {
@praeclarum
praeclarum / EasyLayout.cs
Last active April 21, 2023 10:28
**OUT OF DATE** Please use the NuGet package https://www.nuget.org/packages/EasyLayout or the code on GitHub https://github.com/praeclarum/EasyLayout. (EasyLayout makes writing auto layout code in Xamarin.iOS easier. See [the example](https://gist.github.com/praeclarum/8185036) for hints on how to use this library.)
//
// Copyright (c) 2013-2015 Frank A. Krueger
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
@lontivero
lontivero / gist:593fc51f1208555112e0
Last active June 24, 2023 20:05
Generates Markdown from VS XML documentation file
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text.RegularExpressions;
using System.Xml;
using System.Xml.Linq;
namespace GithubWikiDoc
{
@lbugnion
lbugnion / gist:e8f9557cd255aaf863b5
Created January 27, 2016 20:53
MVVM Light binding framework for Xamarin supports deep paths with changing objects! Passed
[Test]
public void BindingDeepPath_DeepSourceExistingPathChangingObjects_NoError()
{
VmSource = new TestViewModel
{
Nested = new TestViewModel
{
Nested = new TestViewModel
{
Model = new TestModel
@lbugnion
lbugnion / gist:db7789d29136d510549b
Created January 27, 2016 21:04
MVVM Light binding framework for Xamarin also supports FallbackValue and TargetNullValue
[Test]
public void BindingDeepPath_DeepSourceExistingPathGraduallySettingPath_NoError()
{
VmSource = new TestViewModel();
VmTarget = new TestViewModel();
const string fallback = "This is the fallback";
const string targetNull = "Target is null";
var binding = new Helpers.Binding<string, string>(
@slightfoot
slightfoot / ensure_visible.dart
Last active July 12, 2021 04:43
DEPRECATED. (Now integrated Into Flutter!!!). Ensure Visible for Flutter. Makes sure TextField or other widgets are scrolled into view when they receive input focus. Just pass the focusNode provided to your TextField inside the builder.
import 'package:flutter/rendering.dart';
import 'package:flutter/widgets.dart';
import 'package:meta/meta.dart';
/// Signature for a function that creates a widget with the supplied [FocusNode].
typedef Widget EnsureVisibleBuilder(BuildContext context, FocusNode focusNode);
/// A widget that ensures it is always visible inside its ancestor scrollable
/// when focused.
class EnsureVisible extends StatefulWidget {
@jeroen-meijer
jeroen-meijer / firebase_storage_image.dart
Created May 13, 2018 00:34
A Flutter widget that handles and shows an image downloaded from a Firebase Storage document.
import 'package:firebase_storage/firebase_storage.dart';
import 'package:flutter/material.dart';
import 'package:meta/meta.dart';
enum ImageDownloadState { Idle, GettingURL, Downloading, Done, Error }
class FirebaseStorageImage extends StatefulWidget {
/// The reference of the image that has to be loaded.
final StorageReference reference;
/// The widget that will be displayed when loading if no [placeholderImage] is set.
@johnazariah
johnazariah / LinqExtensions.cs
Last active June 17, 2024 10:53
Maybe Monad in C#
public static partial class LinqExtensions
{
public static Maybe<C> SelectMany<A, B, C>(this Maybe<A> ma, Func<A, Maybe<B>> f, Func<A, B, C> select) => ma.Bind(a => f(a).Map(b => select(a, b)));
}