View Crop composition addon for MeteorJS collections
This file contains 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
// XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX | |
// COMPOSITION | |
// XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX | |
composition: { | |
type: Object, | |
label: 'Composición (cada 100gr)', | |
optional: true | |
}, |
View Strange Esp8266 behaviour
This file contains 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
AT+RST | |
OK | |
WIFI DISCONNECT | |
ets J`n 8 2013,rst cause:2, boot mode:(3,6) | |
load 0x40100000,,tail 0 | |
chkstm 0x63 |
View index.js
This file contains 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
"use strict" | |
let kafka = require('kafka-node'), | |
HighLevelProducer = kafka.HighLevelProducer, | |
client = new kafka.Client('localhost:2181/'), | |
producer = new HighLevelProducer(client) | |
// In this demo, topics are intended to be created already. | |
// See kafka docs (or check https://hub.docker.com/r/wurstmeister/kafka/ => | |
// "Automatically create topics") |
View hosts
This file contains 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
################################################################################ | |
# Prevent OSX calling home # | |
# # | |
# Mix of different /etc/hosts files found over internet, and calls filtered # | |
# using LittleSnitch for months. # | |
# # | |
# OSX sends a huge amount of requests to Cuppertino, even when you don't use # | |
# Spotlight suggestions, iCloud, updates and other services. Even if they are # | |
# disabled. # | |
# # |
View tsp.js
This file contains 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
/* | |
* 0.0.1 - 29.06.16 | |
* Experimental. | |
* | |
* Original code: https://github.com/parano/GeneticAlgorithm-TSP | |
*/ | |
Array.prototype.clone = function() { return this.slice(0); } | |
Array.prototype.shuffle = function() { | |
for(var j, x, i = this.length-1; i; j = randomNumber(i), x = this[--i], this[i] = this[j], this[j] = x); |
View .travis.yml
This file contains 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
language: node_js | |
node_js: | |
- '0.10' | |
sudo: required | |
before_install: | |
- curl https://install.meteor.com | /bin/sh | |
script: meteor test --once --driver-package dispatch:mocha-phantomjs |
View actions.test.js
This file contains 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
require('./actions'); | |
describe( 'actions tests', () => { | |
it( 'dilbert', () => { | |
var actionResult = actions['dilbert'](); | |
assert.typeOf( actionResult, 'object' ); | |
assert.typeOf( actionResult.display, 'object' ); | |
assert.typeOf( actionResult.display.title, 'string' ); | |
assert.typeOf( actionResult.display.link, 'string' ); | |
assert.typeOf( actionResult.display.html, 'string' ); |
View meteorapp-nginx-site.conf
This file contains 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
server_tokens off; # for security-by-obscurity: stop displaying nginx version | |
# this section is needed to proxy web-socket connections | |
map $http_upgrade $connection_upgrade { | |
default upgrade; | |
'' close; | |
} | |
server { |
View meteorapp.conf
This file contains 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
# upstart service file at /etc/init/meteorapp.conf | |
description "Meteor.js application" | |
author "Jose Constela <jose@joseconstela.com>" | |
# When to start the service | |
start on started mongod and runlevel [2345] | |
# When to stop the service | |
stop on shutdown |
View env-setup.sh
This file contains 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
################################################################################ | |
## OSX customisations | |
################################################################################ | |
# Map CAPS key to esc. - https://stackoverflow.com/a/40254864 | |
# Allow repeated keys | |
defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false | |
# Time until key repetition | |
defaults write -g InitialKeyRepeat -int 10 |