Skip to content

Instantly share code, notes, and snippets.

@bulwinkel
bulwinkel / set-version-from-git.sh
Created October 9, 2018 00:42
iOS Git Versioning
#!/usr/bin/env bash
# set-version-from-git.sh
# Usage: `set-version-from-git.sh [branch]`
# Run this script after the 'Copy Bundle Resources' build phase
# Ref: http://tgoode.com/2014/06/05/sensible-way-increment-bundle-version-cfbundleversion-xcode/
# Sets the build and version numbers in the compiled app bundle so it doesn't
# modify your version controlled info.plist
branch=${1:-'master'}
@bulwinkel
bulwinkel / mapToBundle.kt
Created January 7, 2017 13:35
Partial implementation of converting a `Map<String, V>` to a Bundle.
package com.bulwinkel.android
import android.os.Bundle
import android.os.IBinder
import android.os.Parcelable
import java.io.Serializable
fun <V> Map<String, V>.toBundle(bundle: Bundle = Bundle()): Bundle = bundle.apply {
forEach {
val k = it.key
@bulwinkel
bulwinkel / main.dart
Created February 8, 2022 02:02
Row with spacer
import 'package:flutter/material.dart';
const Color darkBlue = Color.fromARGB(255, 18, 32, 47);
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override