Skip to content

Instantly share code, notes, and snippets.

View matthiasak's full-sized avatar
📘
@hashicorp Terraform 💯 expression engine builds dep-trees of values

Matt Keas matthiasak

📘
@hashicorp Terraform 💯 expression engine builds dep-trees of values
  • Google
  • Houston, TX
View GitHub Profile
// text coords
texts.push({x: Building.width/2, y:Building.length/2, obj: {name:Building.name}, attr:{'font-size':'15px'} });
texts.push({x: Building.width/2, y:Building.length, obj: _.find(Building.surfaces, function(el){ return el.swa; }), attr:{'font-size':'10px'} });
texts.push({x: 0, y:Building.length/2, obj: _.find(Building.surfaces, function(el){ return el.ewb; }), attr:{'font-size':'10px', rotate:-90} });
texts.push({x: Building.width/2, y:0, obj: _.find(Building.surfaces, function(el){ return el.swc; }), attr:{'font-size':'10px'} });
texts.push({x: Building.width, y:Building.length/2, obj: _.find(Building.surfaces, function(el){ return el.ewd; }), attr:{'font-size':'10px', rotate:90} });
/// later used in
@matthiasak
matthiasak / gist:3005030
Created June 27, 2012 15:59
Socket io and Express
var express = require('express'),
app = express.createServer(),
io = require('socket.io'),
sio,
_ = require('underscore');
// Configuration
app.configure(function() {
app.set('views', __dirname + '/views');
// 1. Write a class to support the following code:
function Person(name){
this.name = name;
}
var thomas = new Person('Thomas');
var amy = new Person('Amy');
thomas.name // --> "Thomas"