Skip to content

Instantly share code, notes, and snippets.

View joaojeronimo's full-sized avatar

João Jerónimo joaojeronimo

View GitHub Profile
# Custom
# Shift arrow to switch windows
bind -n S-Left previous-window
bind -n S-Right next-window
# Use Alt-arrow keys without prefix key to switch panes
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U

Keybase proof

I hereby claim:

  • I am joaojeronimo on github.
  • I am joaojeronimo (https://keybase.io/joaojeronimo) on keybase.
  • I have a public key ASB9eGsUA6uH4sLRGPMAflIJ_I8aOuSLAg3W-9RsT4jHXQo

To claim this, I am signing this object:

@joaojeronimo
joaojeronimo / getting-started.md
Last active August 29, 2015 14:18
Getting Started With Go

Install Go

  • You'll want 1.4.x
  • Don't get it from the package manager (unless you use Arch, brew is also fine)

Setup your environment

Set GOROOT to where Go is installed, GOPATH to where you'll want libraries to be installed and where you'll be working

@joaojeronimo
joaojeronimo / crowdprocess.js
Created May 16, 2014 15:45
Can it get any easier ?
var credentials = require('./credentials');
var CrowdProcess = require('..')(credentials);
function Run (d) {
return d*2;
}
var data = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
CrowdProcess(data, Run, function (results) {
@joaojeronimo
joaojeronimo / simple-crowdprocess-example.js
Last active January 4, 2016 01:59
A very simple example on how to use CrowdProcess in Node.js: https://github.com/CrowdProcess/node-crowdprocess
var credentials = require('./credentials.json');
var CrowdProcess = require('crowdprocess')(credentials);
function Run (d) {
return d*2;
}
var data = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
CrowdProcess(data, Run, function (results) {
@joaojeronimo
joaojeronimo / node-crowdprocess-simple.js
Last active January 3, 2016 08:39
data may be a readable stream or an array.
var CrowdProcess = require('crowdprocess');
var crp = new CrowdProcess('[email protected]', 'password');
// Run must be a function or a string containing valid Javascript code
// data must be a readable stream or an array
crp.map(Run, data, onResult);
function onResult (err, result) {
console.log(result);
}
@joaojeronimo
joaojeronimo / check-errors.sh
Last active January 3, 2016 05:39
For the CrowdProcess REST API Guide
$ curl https://api.crowdprocess.com/jobs/<job_id>/errors \
-u "<[email protected]>:<yourpassword>"
@joaojeronimo
joaojeronimo / tasks.njson
Created December 12, 2013 16:30
Let's check if the following numbers are prime numbers, with https://gist.github.com/joaojeronimo/7930840
295075130
295075131
295075132
295075133
295075134
295075135
295075136
295075137
295075138
295075139
function Run (number) {
var isPrime = true;
var i = number;
while (i--) {
if (i === 0 || i === 1 || i === number)
continue;
if (!(number % i))
isPrime = false;
}
{"lower": 0, "upper": 1000}
{"lower": 1000, "upper": 2000}
{"lower": 2000, "upper": 3000}
{"lower": 3000, "upper": 4000}
{"lower": 4000, "upper": 5000}
{"lower": 5000, "upper": 6000}
{"lower": 6000, "upper": 7000}
{"lower": 7000, "upper": 8000}
{"lower": 9000, "upper": 10000}
{"lower": 10000, "upper": 11000}