Skip to content

Instantly share code, notes, and snippets.

View jeroen-meijer's full-sized avatar
🇳🇱
Good times

Jeroen Meijer (Jay) jeroen-meijer

🇳🇱
Good times
View GitHub Profile
@jeroen-meijer
jeroen-meijer / Podfile
Created April 9, 2018 14:19
Temporary solution for flutter/flutter issue #16036: "Flutter/Flutter.h not found." on iOS.
# 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 [];
@jeroen-meijer
jeroen-meijer / .gitignore
Created May 22, 2018 13:58
General Android .gitignore (including VSCode, JetBrains and Vim).
### 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 / fp_currency-formatter.ts
Last active January 23, 2019 13:48
[TS] Functional Programming - Currency Formatter
// 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 / main.dart
Created March 27, 2020 20:15
Dialog Example
// 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 / 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.
@jeroen-meijer
jeroen-meijer / .gitignore
Created September 12, 2018 04:47
General Flutter .gitignore (including VS Code, IntelliJ & Firebase files).
### 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 August 23, 2023 04:05
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.
#!/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 / fluttercleanrecursive.sh
Created September 15, 2019 13:00
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.
#!/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)"