Skip to content

Instantly share code, notes, and snippets.

View franciscojunior's full-sized avatar

Francisco Figueiredo Jr. franciscojunior

View GitHub Profile
@franciscojunior
franciscojunior / LiveData.kt
Created July 15, 2018 14:08 — forked from arekolek/LiveData.kt
LiveData extension property for use in unit tests
val <T> LiveData<T>.blockingValue: T?
get() {
var value: T? = null
val latch = CountDownLatch(1)
observeForever {
value = it
latch.countDown()
}
if (latch.await(2, TimeUnit.SECONDS)) return value
else throw Exception("LiveData value was not set within 2 seconds")
@franciscojunior
franciscojunior / install virtualenv ubuntu 16.04.md
Created January 11, 2018 20:42 — forked from Geoyi/install virtualenv ubuntu 16.04.md
How to install virtual environment on ubuntu 16.04

How to install virtualenv:

Install pip first

sudo apt-get install python3-pip

Then install virtualenv using pip3

sudo pip3 install virtualenv 
@franciscojunior
franciscojunior / bcb.R
Created February 1, 2017 10:39 — forked from arademaker/bcb.R
getting data from BCB (Banco Central do Brasil)
# This script was originally written during for a summer course that I
# gave at FGV in January 2011. The script was used to show the
# students how to retrive data from Banco Central do Brasil
# (http://bcb.gov.br/?SERIETEMP) using SOAP protocol and R.
library(SSOAP)
library(XML)
library(RCurl)
wsdl <- getURL("https://www3.bcb.gov.br/sgspub/JSP/sgsgeral/FachadaWSSGS.wsdl",
@franciscojunior
franciscojunior / introrx.md
Created December 19, 2016 18:50 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing