Skip to content

Instantly share code, notes, and snippets.

View rafaelwkerr's full-sized avatar
😃
Learning Functional Programming

Rafael Kerr rafaelwkerr

😃
Learning Functional Programming
View GitHub Profile
@rafaelwkerr
rafaelwkerr / Event-stream based GraphQL subscriptions.md
Created November 9, 2016 12:40 — forked from OlegIlyenko/Event-stream based GraphQL subscriptions.md
Event-stream based GraphQL subscriptions for real-time updates

In this gist I would like to describe an idea for GraphQL subscriptions. It was inspired by conversations about subscriptions in the GraphQL slack channel and different GH issues, like #89 and #411.

Conceptual Model

At the moment GraphQL allows 2 types of queries:

  • query
  • mutation

Reference implementation also adds the third type: subscription. It does not have any semantics yet, so here I would like to propose one possible semantics interpretation and the reasoning behind it.

@rafaelwkerr
rafaelwkerr / SampleTest.java
Created March 22, 2016 22:48 — forked from rodrigohenriques/SampleTest.java
Testing asyncronous observables to parallelize work
public class SampleTest {
@Test
public void testObservableParallel() {
List<String> terminals = new ArrayList<>();
for (int i = 0; i < 100000; i++) {
terminals.add(i, String.format("Terminal %s", i + 1));
}
PublishSubject<String> publisher = PublishSubject.create();
@rafaelwkerr
rafaelwkerr / iterm2-solarized.md
Created March 6, 2016 16:21 — forked from magnocosta/iterm2-solarized.md
iTerm2 + oh my zsh + solarized + Meslo powerline font (OSX)

Solarized

@rafaelwkerr
rafaelwkerr / genymotionwithplay.txt
Created January 28, 2016 16:14 — forked from wbroek/genymotionwithplay.txt
Genymotion with Google Play Services
Download the following ZIPs:
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links)
Download the correct GApps for your Android version:
Google Apps for Android 6.0 (https://www.androidfilehost.com/?fid=24052804347835438 - benzo-gapps-M-20151011-signed-chroma-r3.zip)
Google Apps for Android 5.1 (https://www.androidfilehost.com/?fid=96042739161891406 - gapps-L-4-21-15.zip)
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip)
Google Apps for Android 4.4.4 (https://www.androidfilehost.com/?fid=23501681358544845 - gapps-kk-20140606-signed.zip)
Google Apps for Android 4.3 (https://www.androidfilehost.com/?fid=23060877490000124 - gapps-jb-20130813-signed.zip)
package br.com.jinkings.soluciona.application.ui.customview;
import android.annotation.TargetApi;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.graphics.Canvas;
import android.os.Build;
import android.util.AttributeSet;
import android.view.View;
# On build host (has internet access): Download and install NodeJS and NPM
wget http://nodejs.org/dist/node-v0.4.10.tar.gz
tar xvzf node-v0.4.10.tar.gz
cd node-v0.4.11
./configure
make
sudo make install
wget http://npmjs.org/install.sh
sudo sh ./install.sh
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="red_50">#fde0dc</color>
<color name="red_100">#f9bdbb</color>
<color name="red_200">#f69988</color>
<color name="red_300">#f36c60</color>
<color name="red_400">#e84e40</color>
<color name="red_500">#e51c23</color>
<color name="red_600">#dd191d</color>
<color name="red_700">#d01716</color>
/*
* Componente para um EditText personalizado com uma máscara. Qualquer comentário ou lógica diferente
* por favor e-mail me rodrigo.sicarelli@gmail.com
*
* @author sicachester
*/
package br.com.sicachester.components;
import android.content.Context;
cd ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/
git clone git://github.com/wbond/sublime_package_control.git Package\ Control
cd Package\ Control
git checkout python3
# restart Sublime Text 3 and you should have Package Control working