Skip to content

Instantly share code, notes, and snippets.

View cortezcristian's full-sized avatar

Cristian Cortez cortezcristian

View GitHub Profile
@cortezcristian
cortezcristian / autocomplete-vp-cup
Created June 6, 2014 19:25
Auto Complete VPcup
function getGoals() {
var p = parseInt((Math.random()*100),10),
r = 0,
g = parseInt((Math.random()*10),10);
if(p<=25) {
r = 0;
} else if(p<=40) {
r = 1;
} else if(p<=50) {
## MongoDump
Normal db dump
```bash
$ mongodump -db <dbname> --out /home/data/backup-<dbname>
```
[Mongo Dump Reference](http://docs.mongodb.org/manual/reference/program/mongodump/#bin.mongodump)
@cortezcristian
cortezcristian / meteor-cpu-limiter.sh
Last active July 26, 2016 13:16
Meteor CPU Limiter
#!/bin/bash
# Author: Cristian Cortez <cortez.cristian@gmail.com>
# Dependencies: cpulimiter
#
# Usage:
# $ sh meteor-cpu-limiter.sh
# Problem the process is taking a lot of resources
# coworkers machines get temperature and their fans makes noice
@cortezcristian
cortezcristian / WinRead.md
Created August 3, 2016 20:28
Install Windows Ionic

sdfsadf

@cortezcristian
cortezcristian / PokemonGo.md
Last active August 4, 2016 12:36
Cómo jugar al PokemonGo sin salir de tu casa
@cortezcristian
cortezcristian / README.md
Last active August 12, 2016 03:16
Phoenix and Elixir

My first impressions using Phoenix and Elixir.

Installation

In OS X simply run:

$ brew install elixir
@cortezcristian
cortezcristian / README.md
Created August 18, 2016 17:48
A1 Candidate Viewer

Issues, Bugs and Inconsistencies

1- Fix candidate case in labels, cases like "city" and "country" should be "City" and "Country"

2- Placeholders text. Fix inconsistencies like "Type candidate location" should be "Country" instead.

grep -lir "custome" app/migrations/201712* app/migrations/20171207120858.js app/migrations/20171222212151.js app/migrations/20171227151229.js

Get the info

const _ = require('lodash');
const fs = require('fs');
const agent = require('superagent');

const readJson = (path, cb) => {
  fs.readFile(require.resolve(path), (err, data) => {
    if (err)