Skip to content

Instantly share code, notes, and snippets.

View swissonid's full-sized avatar
💙
Learning new things

Patrice Müller swissonid

💙
Learning new things
View GitHub Profile
@slightfoot
slightfoot / timestamp_converter.dart
Created April 22, 2020 16:28
Timestamp/DateTime Converter for Cloud Firestore and Dart/Flutter.
// MIT License
//
// Copyright (c) 2020 Simon Lightfoot
//
// 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:
@slightfoot
slightfoot / media_query_extension.dart
Last active July 29, 2021 13:32
Media Query Extension - by Simon Lightfoot
// MIT License
//
// Copyright (c) 2020 Simon Lightfoot
//
// 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:
@dnfield
dnfield / image_diff.dart
Created August 6, 2018 14:45
Image diffing code
import 'dart:math' as Math;
import 'dart:typed_data' show Uint8List;
int pixelmatch(
Uint8List img1, Uint8List img2, Uint8List output, int width, int height,
{double threshold = 0.1, bool includeAA = true}) {
if (img1.length != img2.length) {
throw new FormatException('Cannot compare images of differing sizes.');
}
@milankorsos
milankorsos / redux-actions.ts
Last active January 10, 2025 19:22
Correct TypeScript typing example for Redux Thunk actions
import {Action, ActionCreator, Dispatch} from 'redux';
import {ThunkAction} from 'redux-thunk';
// Redux action
const reduxAction: ActionCreator<Action> = (text: string) => {
return {
type: SET_TEXT,
text
};
};
@polbins
polbins / README.md
Last active January 15, 2025 08:50
Android Studio as default Git Diff Tool

Create Android Studio Command-line Launcher

  1. Open Android Studio
  2. Go to: Tools > Create Command-line Launcher
  3. Leave as default, Press OK

Configure Git to use Android Studio as default Diff Tool

  1. Add the following lines to your .gitconfig
@staltz
staltz / introrx.md
Last active May 6, 2025 07:45
The introduction to Reactive Programming you've been missing