Skip to content

Instantly share code, notes, and snippets.

https://github.com/jturolla-nubank is me
@jturolla
jturolla / gist:ef2d95bd028c15cbcd5b163bc4f7ae6c
Created March 24, 2018 16:18
public image hosting gist
public image hosting
@jturolla
jturolla / job.json
Last active September 8, 2016 12:38
{
"topic": "jobs",
"event": "updated",
"uri": "https: //api.parafuzo.com/jobs/85ae6363-0cc8-4410-b3c0-41ce94f77f72"
}
def find_taskers
Tasker.near(job.to_coordinates, 20, units: :km)
.where(query_params)
.where(service_ids: { '$all' => required_services })
.limit(config.list_limit)
end
def query_params
{
:id.nin => invalid_taskers,
@jturolla
jturolla / ActivityRealmRobolectricTest.java
Last active April 21, 2021 06:06
This gist provides a simple example of mocking a Realm database for android in java using Robolectric.
package com.example;
import android.content.Intent;
import android.widget.Button;
import com.example.MockSupport;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
~/dev/parafuzo on ⭠ master ⌚ 11:33:46
$ start-parafuzo
- Scale.........system `mongodb` from 0 to 1 instances...
- Checking......image `dockerfile/mongodb:latest`...
- Scale.........system `redis` from 0 to 1 instances...
- Checking......image `dockerfile/redis:latest`...
- Scale.........system `mail` from 0 to 1 instances...
- Checking......image `kdihalas/mail:latest`...
- Scale.........system `poseidon` from 0 to 1 instances...
- Checking......image `dynaum/ruby-sqlite:latest`...
### Keybase proof
I hereby claim:
* I am jturolla on github.
* I am jturolla (https://keybase.io/jturolla) on keybase.
* I have a public key whose fingerprint is 793C 7E9F AFD6 044D CF53 FF39 6075 91C3 9935 125E
To claim this, I am signing this object: