Skip to content

Instantly share code, notes, and snippets.

Avatar
📱
Doing mobile! ❤️

Walmyr Carvalho walmyrcarvalho

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

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 Mar 1, 2017
Kotlin coroutines basic example.
View Coroutines.kt
// 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 Feb 14, 2016 — forked from sdsantos/Preconditions.java
Small Preconditions helper class for your Offensive Programming
View Preconditions.java
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));
}
View CollapsingTitleLayout.java
/*
* 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
View bookshelf.md

Books

Work in progress

--

Put some books here tomorrow

View ForegroundLinearLayout.java
/*
* 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
View ForegroundLinearLayout.java
/*
* 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
View osx_setup.md

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...

You can’t perform that action at this time.