[ Launch: switch ] 8720744 by maggiben
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fs = require("fs"); | |
var index = 1; | |
var obj = []; | |
var lineNumber = 0; | |
fs.readFileSync('./Bovespa.csv').toString().split('\n').forEach(function (line) { | |
var array = line.split(";"); | |
try { | |
var d = array[0].split("/"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Normalize dates for mongodb import | |
for file in $(ls ./stocks) | |
do | |
collection=$(echo ${file}|sed s/\.[^\.]*$//) | |
mongoimport --host linus.mongohq.com --port 10050 --username admin --password admin --db nasdaq100 --collection ${collection} --type csv --file ./stocks/${files} --headerline --upsert | |
done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Bare bones template engine | |
*/ | |
const hydrate = function(template, scope) { | |
if ( | |
template.constructor === String && | |
template.length && | |
scope.constructor === Object && | |
Object.keys(scope).length | |
) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"schedule": 0, | |
"sendTo": 1, | |
"brandId": 0, | |
"lastSent": 1386770181289 | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<title>Crossfilter</title> | |
<link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet"> | |
<style> | |
body { | |
font-family: arial; | |
} | |
.main { | |
position: relative; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file has been truncated, but you can view the full file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# BLOCK COUNTRY BY IP RANGE | |
# IncrediBILL's HTACCESS Tools | |
# http://incredibill.me | |
<Limit GET POST HEAD> | |
order allow,deny | |
# | |
# Block from AFGHANISTAN (AF) | |
# | |
deny from 27.116.56.0/22 | |
deny from 58.147.128.0/19 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//////////////////////////////////////////////////////////////////////////////// | |
// @file : i8n.js // | |
// @summary : Internacionalization module // | |
// @version : 0.1 // | |
// @project : i8n // | |
// @description : // | |
// @author : Benjamin Maggi // | |
// @email : [email protected] // | |
// @date : 7 Mar 2014 // | |
// -------------------------------------------------------------------------- // |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('humanize', []) | |
.filter('humanize', function(){ | |
return function humanize(number) { | |
if(number < 1000) { | |
return number; | |
} | |
var si = ['K', 'M', 'G', 'T', 'P', 'H']; | |
var exp = Math.floor(Math.log(number) / Math.log(1000)); | |
var result = number / Math.pow(1000, exp); | |
result = (result % 1 > (1 / Math.pow(1000, exp - 1))) ? result.toFixed(2) : result.toFixed(0); |