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 socket = require( 'socket.io-client' )( 'http://localhost:4567' ); | |
//var socket = require( 'socket.io-client' )( 'http://127.0.0.1:8080/primus', { | |
// transports: [ 'polling', 'websocket' ], | |
// forceBase64: true, | |
// rememberUpgrade: false, | |
// enablesXDR: false, | |
// timestampRequests: true | |
//} ); | |
//var socket = require( 'socket.io-client' )( 'http://127.0.0.1:8080/primus' ); |
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 socket = require( 'engine.io-client' )( 'http://localhost:8080' ); | |
//engine.io-client callbacks | |
socket.on( 'open', function() { | |
console.log( 'open!' ); | |
} ); | |
socket.on( 'message', function( data ) { | |
console.log( 'message=' + message.toString() ); | |
} ); | |
socket.on( 'close', function() { |
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
start promisifyInLine | |
calling `a`, willError=false | |
promisifyInLine from a=123 | |
calling `b`, willError=false | |
promisifyInLine from b=456 | |
promisifyInLine error=null results=done promisifyInLine | |
start promisifyUsingAll | |
calling `a`, willError=false | |
promisifyUsingAll from a=123 |
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
app.game = { | |
state: { | |
currentTurn: 'player1' | |
}, | |
player1: { | |
name: 'Player 1', | |
stacks: { | |
stack1: ['1'], | |
stack2: ['2'], | |
stack3: ['3'], |
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
<section data-route="game"> | |
<div>Game board</div> | |
<game-board game="{{game}}"></game-board> | |
</section> |
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
Polymer({ | |
is: 'card-stack', | |
behaviors: [Polymer.IronResizableBehavior], | |
listeners: { | |
"iron-resize": "resized" | |
}, | |
resized: function() { | |
var height = this.offsetHeight - 2; | |
var stackWidth = this.offsetWidth - 2; | |
if (height > 0) { |
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
.game-card { | |
position: relative; | |
transition: transform .5s linear 0s; | |
backface-visibility: hidden; | |
} | |
.game-card .front { | |
transform: rotateY( 180deg); | |
position: absolute; | |
} |
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
<template is="dom-repeat" items="{{data}}"> | |
<game-card style$="{{calcMargin(reverse, index, cardWidth)}}" class="card-in-stack" rank="{{item}}" card-width="[[cardWidth]]" card-height="[[cardHeight]]"> | |
</game-card> | |
</template> | |
<style include="shared-styles"> | |
.card-in-stack { | |
position: absolute; | |
} | |
</style> |
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
//text, topicArn, and api.aws.sns all defined elsewhere in scope | |
var apnsMessage = JSON.stringify({ | |
aps: { | |
alert: text, | |
extraData: 'thing' | |
} | |
}); | |
var gcmMessage = JSON.stringify({ | |
data: { | |
message: text, |
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
# This is for ElasticBeanstalk with Amazon Linux 2023. For previous Linux 2 or Linux 1, see revisions for ideas | |
packages: | |
yum: | |
cups-libs: [] | |
libdrm: [] | |
libXdamage: [] | |
libXfixes: [] | |
libXrandr: [] | |
mesa-libgbm: [] | |
libxkbcommon: [] |
OlderNewer