Skip to content

Instantly share code, notes, and snippets.

View franciscojunior's full-sized avatar

Francisco Figueiredo Jr. franciscojunior

View GitHub Profile
@franciscojunior
franciscojunior / continuefirefox.sh
Last active October 8, 2016 19:31
Stop and continue Firefox processes
ps aux | grep -v "grep" | grep -i firefox.app | awk '{print $2}' | xargs kill -CONT
@franciscojunior
franciscojunior / ExpandableCheckBoxesLayout.patch
Created November 6, 2016 21:12
Patch to add ExpandableCheckboxesLayout
diff --git a/app/src/main/java/name/vampidroid/ui/widget/CardFilters.java b/app/src/main/java/name/vampidroid/ui/widget/CardFilters.java
index 4133e99..3ff912e 100644
--- a/app/src/main/java/name/vampidroid/ui/widget/CardFilters.java
+++ b/app/src/main/java/name/vampidroid/ui/widget/CardFilters.java
@@ -19,6 +19,9 @@ import android.widget.LinearLayout;
import android.widget.SeekBar;
import android.widget.TextView;
+import java.util.Arrays;
+import java.util.List;
@franciscojunior
franciscojunior / introrx.md
Created December 19, 2016 18:50 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@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 / PlaygroundTests
Created October 15, 2017 21:17
RxJava test samples
public class PlaygroundTests {
// Template test using Observables
// Reference: http://docs.couchbase.com/developer/java-2.0/observables.html
@Test
public void test_subscribe0() throws InterruptedException {
final CountDownLatch latch = new CountDownLatch(1);
@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 / 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 / TitleFlowIndicator.java
Created August 3, 2011 15:43
Sample of viewflow with fragments. Note that you have to use the custom file TitleFlowIndicator below because it contains the support for the FragmentPagerAdapter
/*
* Copyright (C) 2011 Patrik Åkerfeldt
*
* 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