Skip to content

Instantly share code, notes, and snippets.

View fforres's full-sized avatar
🔥

Felipe Torres (fforres) fforres

🔥
View GitHub Profile
export async function getCoworkByName(name) {
try {
const coworkByName = await getCoworkByNameAsync(name); //Devuelve el objeto del siguiente file
console.log(coworkByName);
return coworkByName;
} catch (err) {
console.log(err);
return err;
}
}
@fforres
fforres / pr.md
Created July 30, 2016 05:41 — forked from piscisaureus/pr.md
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = [email protected]:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@fforres
fforres / gist:8f493e169af80d6e8ac6e7f2cb4406ef
Last active August 4, 2016 20:48
setting up digitalocean's instance of neo4j
free -m
df -h
sudo fallocate -l 1500M /swapfile
df -h
sudo chmod 600 /swapfile
ls -lh /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
free -m
sudo nano /etc/fstab
@fforres
fforres / hackerrank_ctci_contacts.js
Last active October 31, 2016 14:09
hackerrank ctcy contacts - fisrt solution
https://www.hackerrank.com/challenges/ctci-contacts
/////////////// ignore above this line ////////////////////
function analizeContacts(){
this.contactObject = {
letters: {},
data: 0
};
this.currentFinds = [];
}
@fforres
fforres / hackerrank_ctci_contacts_v2_map.js
Last active October 31, 2016 14:09
hackerrank ctcy contacts - maps solution
https://www.hackerrank.com/challenges/ctci-contacts
/////////////// ignore above this line ////////////////////
function analizeContacts(){
this.contactObject = new Map();
this.currentFinds = [];
}
analizeContacts.prototype.find = function(term){
let currentWords = null;
if(this.contactObject.get(term)) {
@fforres
fforres / hackerrank_ctci_contacts_v2_object.js
Created October 31, 2016 14:09
hackerrank ctcy contacts - object solution
https://www.hackerrank.com/challenges/ctci-contacts
/////////////// ignore above this line ////////////////////
function analizeContacts(){
this.contactObject = {};
this.currentFinds = [];
}
analizeContacts.prototype.find = function(term){
let currentWords = null;
if(this.contactObject[term]) {
@fforres
fforres / hackerrank_ctci_contacts_v3_objects_and_link.js
Last active October 31, 2016 20:58
hackerrank ctcy contacts - maps solution Raw
@fforres
fforres / order.js
Created November 3, 2016 19:37
uber_interview
var leaves = [
['flare', 'analytics', 'cluster', 'AgglomerativeCluster'],
['flare', 'scale', 'scaleType'],
['flare', 'analytics', 'cluster', 'CommunityStructure'],
['flare', 'vis', 'data', 'render', 'ShapeRenderer'],
['flare', 'analytics', 'graph', 'MaxFlowMinCut'],
['flare', 'analytics', 'graph', 'LinkDistance']
];
@fforres
fforres / keybase.md
Created November 4, 2016 18:41
keybase.md

Keybase proof

I hereby claim:

  • I am fforres on github.
  • I am fforres (https://keybase.io/fforres) on keybase.
  • I have a public key whose fingerprint is FCCD 0ECD 1214 36DD D071 4C26 5668 7D59 20E8 38A2

To claim this, I am signing this object:

@fforres
fforres / data.js
Created November 14, 2016 01:32
hackerrank, graph - BFS - shortest reach
This file has been truncated, but you can view the full file.
module.exports = `6
446 30338
174 272
93 344
321 433
408 31
207 186
150 98
177 293
147 380