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
// actions/game.js | |
// A collection of tasks and helper methods to create a simpel tic-tac-toe game | |
// - single player | |
// - simple AI | |
// - each connection can only have one active game at a time | |
exports.gameCreate = { | |
name: "gameCreate", | |
description: "I create a new game for this connection", |
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
var faye = require('faye'); | |
var fayeRedis = require('faye-redis'); | |
var http = require('http'); | |
var fs = require('fs'); | |
var channel = "/chat" | |
var options = { | |
mount: "/faye", | |
timeout: 45, | |
ping: null, |
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
// ... | |
config.servers.web.rootEndpointType = 'api' | |
// ... |
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 node | |
// A simple DMX example which will turn all the lights on and off every second | |
// You can use this as a fork within another application as well (cluster-awareness) | |
//////////// | |
// dmx.js // | |
//////////// | |
var ftdi = require('ftdi'); |
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
<html> | |
<head> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> | |
</head> | |
<body> | |
<div id="container"></div> | |
<script type="text/javascript"> | |
var doRequest = function(action){ | |
$.get('/api/' + action, function(data){ |
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
<html> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=utf-8" /> | |
<meta http-equiv="content-language" content="en" /> | |
<meta name="description" content="actionhero.js" /> | |
<title>actionhero.js WebSocket Load Test</title> | |
<style> | |
.green {background-color: green;} | |
.red {background-color: red;} |
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
### Keybase proof | |
I hereby claim: | |
* I am evantahler on github. | |
* I am evantahler (https://keybase.io/evantahler) on keybase. | |
* I have a public key whose fingerprint is 8132 187A 483C CB1C D6D4 A5DF ED85 B288 15AC F3BE | |
To claim this, I am signing this object: |
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
var XmppPrototype = require('node-xmpp'); | |
var xmpp = function(api, options, next){ | |
////////// | |
// INIT // | |
////////// | |
var type = 'xmpp' | |
var attributes = { |
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
> uname -a (osx yosemite) | |
Darwin Opsimus.local 14.0.0 Darwin Kernel Version 14.0.0: Fri Sep 19 00:26:44 PDT 2014; root:xnu-2782.1.97~2/RELEASE_X86_64 x86_64 | |
> node --version | |
v0.10.35 | |
> npm --version | |
2.1.18 | |
> npm login |
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 ruby | |
require 'json' | |
inventory_file = 'production' | |
# Configure inputs | |
# assumes a project layout with ./inventories/{{ inventory_file }} | |
if File.exists? '/var/lib/awx/projects/' | |
folder = Dir.glob('/var/lib/awx/projects/*').max { |a,b| File.ctime(a) <=> File.ctime(b) } |