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
box: node | |
build: | |
steps: | |
- script: | |
name: setup | |
code: | | |
sudo apt-get update -y -qq | |
- install-packages: | |
packages: ruby ruby-dev bzr mercurial git wget | |
- script: |
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
// ---- | |
// Sass (v3.3.4) | |
// Compass (v1.0.0.alpha.18) | |
// ---- | |
// Capitalize string | |
// -------------------------------------------------------------------------------- | |
// @param [string] $string | |
// -------------------------------------------------------------------------------- | |
// @return [string] |
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
// Bouncing a user back to their last place after authentication with Express 3 | |
// To accompany http://stackoverflow.com/a/12443844/1380669 | |
// by therealplato | |
var express = require('express'); | |
var app = express(); | |
require('http').createServer(app).listen(3000 | |
, function(err){ | |
console.log(err || "Listening on 3000"); | |
}); |
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
getBoardBoundingBox: function(canvas) { | |
var minX = Number.MAX_VALUE; | |
var maxX = Number.MIN_VALUE; | |
var minY = Number.MAX_VALUE; | |
var maxY = Number.MIN_VALUE; | |
canvas.forEachObject(function(o){ | |
var rad = o.angle * Math.PI/180; | |
var w = o.width * o.scaleX; |