Skip to content

Instantly share code, notes, and snippets.

View mtilbrook-dev's full-sized avatar

Mitchell Tilbrook mtilbrook-dev

  • Sydney, Australia
View GitHub Profile
@mtilbrook-dev
mtilbrook-dev / build.gradle
Created September 13, 2017 09:03
example of how to use shared dependencies in android module
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
android {
// the ext.versions in the dependencies.gradle is accessable
compileSdkVersion versions.compileSdk
buildToolsVersion versions.buildTools
defaultConfig {
applicationId "tilbrook.com.au.appName"
@mtilbrook-dev
mtilbrook-dev / build.gradle
Last active January 10, 2018 20:24
Apply shared dependencies to android project
// Top-level build file where you can add configuration options common to all sub-projects/modules.
apply from: 'dependencies.gradle'
buildscript {
// Gradle will not find vars defined in an external file when referring to them
// in the buildscript block, unless you link it from the buildscript block, too.
apply from: 'dependencies.gradle'
repositories {
google()
jcenter()
@mtilbrook-dev
mtilbrook-dev / dependencies.gradle
Last active January 10, 2018 20:11
Example shared dependencies.gralde
ext.versions = [
code : 1,
name : '1.0',
minSdk : 16,
targetSdk : 26,
compileSdk : 26,
buildTools : '26.0.1',
@mtilbrook-dev
mtilbrook-dev / VSCode-dotnetcore.md
Created July 31, 2017 08:35
Setting up debugging for .NET Core in VSCode
  • Open VSCode in the primary project folder
  • Install C# for VSCode if not already done
    • This contains the .NET Core Debug templates
    • This might be overkill for now, but it work
  • Configure debugger as .NET Core
    • This should create a launch.json under .vscode in the current workspace root folder
  • Try running a debug session
    • This will result in the error Could not find the preLaunchTask 'build'. Press Configure Task Runner
    • Don't worry if you miss click and dismiss the promt, it will show the same error again.
    • Configure Task Runner will ask for a Task Runner again pick .NET Core
@mtilbrook-dev
mtilbrook-dev / slides.md
Created June 20, 2017 23:29
Why React and Android
@mtilbrook-dev
mtilbrook-dev / react-typescript.md
Last active April 29, 2018 03:56
React TypeScript

footer: @sir_tilbrook

TypeScript React in 5min


TypeScript init

npm install -g typescript tslint
@mtilbrook-dev
mtilbrook-dev / presentation.md
Last active May 24, 2017 09:16
F# News May
@mtilbrook-dev
mtilbrook-dev / MonadBuilder.java
Created July 19, 2016 11:31
Monad Builder in Java
public static final class Builder {
private final String firstName;
private final String lastName;
private final String middleName;
public static Builder builder() {
return new Builder("", "", "");
}
private Builder(String firstName, String middleName, String lastName) {
@mtilbrook-dev
mtilbrook-dev / Talk.MD
Last active April 12, 2016 13:23
Xamarin Android Talk - Sydney - April
@mtilbrook-dev
mtilbrook-dev / PabloPicasso.kt
Last active July 13, 2018 03:07
Android Picasso Rewrite Retry Policy
// Kotlin conversion from https://gist.github.com/extralam/cda4ce0d7341b929efd4
// This could be better. For now this works
inline fun OkHttpClient.init(f: OkHttpClient.() -> Unit): OkHttpClient {
this.f()
return this
}
class PabloPicasso {
val picasso: Picasso