Moved to https://github.com/kbilsted/Functional-core-imperative-shell/blob/master/README.md
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'; | |
var cluster = require('cluster'); | |
if (cluster.isMaster) { | |
// server | |
var cpus = require('os').cpus().length; | |
for (var i = 0; i < cpus; i++) { | |
cluster.fork(); | |
} | |
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
return promises.reduce(function (accumulated, value) { | |
return Q.when(accumulated, function (accumulated) { | |
return Q.when(value, function (value) { | |
return accumulated + value; | |
}); | |
}); | |
}) |
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
http://www.infoq.com/presentations/Simple-Made-Easy | |
http://www.infoq.com/presentations/integration-tests-scam | |
http://blog.thecodewhisperer.com/2010/09/14/when-is-it-safe-to-introduce-test-doubles | |
http://youtu.be/yTkzNHF6rMs | |
http://pyvideo.org/video/1670/boundaries | |
http://skillsmatter.com/podcast/ajax-ria/enumerators | |
http://alistair.cockburn.us/Hexagonal+architecture | |
http://c2.com/cgi/wiki?PortsAndAdaptersArchitecture | |
http://www.confreaks.com/videos/977-goruco2012-hexagonal-rails | |
http://www.confreaks.com/videos/1255-rockymtnruby2012-to-mock-or-not-to-mock |
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
(ns server.core) | |
(def http (js/require "http")) | |
(def hostname "127.0.0.1") | |
(def port 3000) | |
(defn handler [req res] | |
(doto res | |
(.writeHead 200 {"Content-Type" "text/plain"}) |
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
For my own sanity ;) Scraped from a variety of places, including: http://stackoverflow.com/questions/14130560/nodejs-udp-multicast-how-to?utm_medium=twitter&utm_source=twitterfeed | |
!Server | |
var news = [ | |
"Borussia Dortmund wins German championship", | |
"Tornado warning for the Bay Area", | |
"More rain for the weekend", | |
"Android tablets take over the world", | |
"iPad2 sold out", |
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
/** | |
* RunInThread an other accompanying files are licensed under the MIT | |
* license. Copyright (C) Frank Appel 2016-2021. All rights reserved | |
*/ | |
import java.lang.annotation.ElementType; | |
import java.lang.annotation.Retention; | |
import java.lang.annotation.RetentionPolicy; | |
import java.lang.annotation.Target; | |
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
#/usr/bin/env bash | |
# MIT © Sindre Sorhus - sindresorhus.com | |
# forked by Gianluca Guarini | |
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)" | |
check_run() { | |
echo "$changed_files" | grep -E --quiet "$1" && eval "$2" | |
} |
This tutorial will turn your Raspberry PI into a simple Bluetooth audio receiver, which plays music through connected speakers. It's like a regular car audio system, but it can be used anywhere and it's a good value.
Audio source (i.e. smartphone)
|
v
((( Wireless Bluetooth Channel )))
|
OlderNewer