Skip to content

Instantly share code, notes, and snippets.

Avatar
🇳🇱
Good times

Jeroen Meijer (Jay) jeroen-meijer

🇳🇱
Good times
View GitHub Profile
View main.dart
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
@jeroen-meijer
jeroen-meijer / fluttercleanrecursive.sh
Created Sep 15, 2019
Flutter Clean Recursive - Clear up space on your hard drive by cleaning your Flutter projects. This script searches for all Flutter projects in this directory and all subdirectories and runs 'flutter clean'. Note: may take a long time for folders with large amounts of projects.
View fluttercleanrecursive.sh
#!/bin/sh
# To run, download the script or copy the code to a '.sh' file (for example 'fluttercleanrecursive.sh') and run like any other script:
# sh ./fluttercleanrecursive.sh
# or
# sudo sh fluttercleanrecursive.sh
echo "Flutter Clean Recursive (by jeroen-meijer on GitHub Gist)"
echo "Looking for projects... (may take a while)"
@jeroen-meijer
jeroen-meijer / fp_currency-formatter.ts
Last active Jan 23, 2019
[TS] Functional Programming - Currency Formatter
View fp_currency-formatter.ts
// Input
const input: number = 17883294145;
// Custom types
enum Direction { left, right };
type List<a> = ({ kind: 'empty' } | { kind: 'cons', head: a, tail: List<a> }) & {
count: (this: List<a>) => number
isEmpty: boolean, // Check if this can be optimized (turned into property).
toString: (this: List<a>) => string
@jeroen-meijer
jeroen-meijer / .gitignore
Created Sep 12, 2018
General Flutter .gitignore (including VS Code, IntelliJ & Firebase files).
View .gitignore
### https://raw.github.com/github/gitignore/80a8803b004013d17291196825a327b9e871f009/Android.gitignore
# Built application files
*.apk
*.ap_
# Files for the ART/Dalvik VM
*.dex
# Java class files
@jeroen-meijer
jeroen-meijer / flutterrepair.sh
Last active Sep 22, 2021
Flutter Repair iOS - When your Flutter build comes up with weird Xcode errors, run this script from your Flutter project directory and it will clean out all the old iOS stuff and get your project dependencies fresh.
View flutterrepair.sh
#!/bin/sh
# To run, download the script or copy the code to a '.sh' file (for example 'flutterrepair.sh') and run like any other script:
# sh ./flutterrepair.sh
# or
# sudo sh flutterrepair.sh
echo "Flutter Repair (by jeroen-meijer on GitHubGist)"
echo Cleaning project...
@jeroen-meijer
jeroen-meijer / .gitignore
Created May 22, 2018
General Android .gitignore (including VSCode, JetBrains and Vim).
View .gitignore
### https://raw.github.com/github/gitignore/80a8803b004013d17291196825a327b9e871f009/Android.gitignore
# Built application files
*.apk
*.ap_
# Files for the ART/Dalvik VM
*.dex
# Java class files
@jeroen-meijer
jeroen-meijer / firebase_storage_image.dart
Created May 13, 2018
A Flutter widget that handles and shows an image downloaded from a Firebase Storage document.
View firebase_storage_image.dart
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.
@jeroen-meijer
jeroen-meijer / Podfile
Created Apr 9, 2018
Temporary solution for flutter/flutter issue #16036: "Flutter/Flutter.h not found." on iOS.
View Podfile
# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
def parse_KV_file(file, separator='=')
file_abs_path = File.expand_path(file)
if !File.exists? file_abs_path
return [];