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 Engine = require('famous/core/Engine'); | |
/** | |
* Sleep after n milliseconds of no touch/mouse movement | |
*/ | |
function sleepOnIdle(idleMS) { | |
var lastMoveMS = Date.now(); | |
window.addEventListener('mousemove', _handleMovement, true); | |
window.addEventListener('touchmove', _handleMovement, true); |
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
define(function(require, exports, module) { | |
var RenderNode = require('famous/core/RenderNode'); | |
var Modifier = require('famous/core/Modifier'); | |
var Surface = require('famous/core/Surface'); | |
function RenderPool() { | |
this._node = new RenderNode(); | |
this._children = {}; | |
this._unusedChildren = []; |
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
myScrollView.render = function() { | |
_tickScrollViewRender() { | |
var prevNode = this._node; | |
var retValue = Scrollview.prototype.render.call(this); | |
var node = this._node; | |
if (node !== prevNode) | |
this._eventOutput.emit('sequenceChange', { node: node, prevNode: prevNode }); |
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
/*globals define*/ | |
define(function(require, exports, module) { | |
'use strict'; | |
// import dependencies | |
var Engine = require('famous/core/Engine'); | |
var Surface = require('famous/core/Surface'); | |
var Modifier = require('famous/core/Modifier'); | |
var Transform = require('famous/core/Transform'); | |
var Utility = require('famous/utilities/Utility'); |
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
{ | |
"{Exif}": { | |
"ExposureTime": 0.06666666666666667, | |
"LensMake": "Apple", | |
"Flash": 16, | |
"ColorSpace": 1, | |
"SubjectArea": [1210, 1108, 509, 509], | |
"ExifVersion": [2, 2, 1], | |
"FocalLenIn35mmFilm": 33, | |
"SceneCaptureType": 0, |
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
window.MicroEvent = function() {}; | |
MicroEvent.prototype = { | |
on: function(event, listener) { | |
this._events = this._events || {}; | |
this._events[event] = this._events[event] || []; | |
this._events[event].push(listener); | |
}, | |
removeListener: function(event, listener) { | |
this._events = this._events || {}; |
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
function getIP() { | |
var interfaces = require('os').networkInterfaces(); | |
var names = Object.keys(interfaces); | |
var addresses = []; | |
var idx = 0; | |
for (var i = 0; i < names.length; i++) { | |
var name = names[i]; | |
var nic = interfaces[name]; |
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
/** | |
* Copyright 2017 John Hurliman <jhurliman.org> | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal | |
* in the Software without restriction, including without limitation the rights | |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
* copies of the Software, and to permit persons to whom the Software is | |
* furnished to do so, subject to the following conditions: | |
* |
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
function readCSV(filename, eachCallback, doneCallback) { | |
var error; | |
var reader = require('readline').createInterface({ | |
input: require('fs').createReadStream(filename), | |
output: null, | |
terminal: false | |
}); | |
reader.on('line', function(line) { |
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
- name: CloudFormation deployment | |
hosts: local | |
connection: local | |
user: root | |
gather_facts: false | |
tags: | |
- initialize | |
tasks: |