Skip to content

Instantly share code, notes, and snippets.

View walmyrcarvalho's full-sized avatar
📱
Doing mobile! ❤️

Walmyr Carvalho walmyrcarvalho

📱
Doing mobile! ❤️
View GitHub Profile
@walmyrcarvalho
walmyrcarvalho / Keybase.md
Created May 12, 2020 16:13
Keybase - Profile Check

Keybase proof

I hereby claim:

  • I am walmyrcarvalho on github.
  • I am walmyrcarvalho (https://keybase.io/walmyrcarvalho) on keybase.
  • I have a public key ASBs7rrDHAqxaqVjO4x6580m3dvsOkNdu9Ej-_1GxT54Qwo

To claim this, I am signing this object:

@walmyrcarvalho
walmyrcarvalho / Coroutines.kt
Last active March 1, 2017 12:38
Kotlin coroutines basic example.
// runs the code in the background thread pool
fun asyncOverlay() = async(CommonPool) {
// start two async operations
val original = asyncLoadImage("original")
val overlay = asyncLoadImage("overlay")
// and then apply overlay to both results
applyOverlay(original.await(), overlay.await())
}
// launches new coroutine in UI context
@walmyrcarvalho
walmyrcarvalho / Preconditions.java
Created February 14, 2016 21:46 — forked from sdsantos/Preconditions.java
Small Preconditions helper class for your Offensive Programming
import android.support.annotation.Nullable;
// Based on http://google-collections.googlecode.com/svn-history/r78/trunk/javadoc/com/google/common/base/Preconditions.html
public class Preconditions {
public static void checkArgument(boolean expression, @Nullable Object errorMessage) {
if (!expression) {
throw new IllegalArgumentException(String.valueOf(errorMessage));
}
/*
* Copyright 2014 Chris Banes
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software

Books

Work in progress

--

Put some books here tomorrow

/*
* Copyright (C) 2006 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
/*
* Copyright (C) 2006 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software

Setup Mac OS X Mountain Lion

I just replaced the hard drive of my mbp and decided to do a clean install of Mountain Lion (10.8.5) since I was still using Snow Leopard (10.6.8).

I kinda regret for not using Boxen to automate the process, but TBH I have this laptop for almost 3yrs and this is the first time I needed to reinstall everything, maybe the next time...