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
'use strict'; | |
angular.module('yourModule') | |
.factory('environmentService', function() { | |
var environment; | |
return { | |
getEnvironment: function() { | |
// We need this to be synchronous since everything depends on it. |
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 environment = { | |
env: process.env.NODE_ENV || 'local' | |
}; | |
var envRegex = /\/\/node::environment\s/; | |
var envString = 'environment = ' + JSON.stringify(environment) + '; //'; | |
var injectEnvironment = function injectEnvironment(req, res) { | |
fs.readFile(path.join(__dirname, '/app/index.html'), function(err, file) { | |
res.send(file.toString().replace(envRegex, envString)); |
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
// Set default node environment to development | |
process.env.NODE_ENV = process.env.NODE_ENV || 'development'; | |
var express = require('express'); | |
var mongoose = require('mongoose'); | |
// Returns some config objects, but I'm not using most for the Deployd test | |
var config = require('./config/environment'); | |
// Setup server | |
var app = express(); |
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
// Reference: http://karma-runner.github.io/0.12/config/configuration-file.html | |
module.exports = function karmaConfig (config) { | |
config.set({ | |
frameworks : [ | |
// Reference: https://github.com/karma-runner/karma-jasmine | |
// Set framework to jasmine | |
'jasmine' | |
], | |
reporters : [ |
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 canvas = document.getElementById('cvs'), | |
ctx = canvas.getContext('2d'), | |
input = document.getElementById('input'), | |
width = +(canvas.width = 400), | |
height = +(canvas.height = 250), | |
fontFamily = "Arial", | |
fontSize = "24px", | |
fontColour = "blue"; | |
function fragmentText(text, maxWidth) { |
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
# For the benefit of emacs users: -*- shell-script -*- | |
########################### | |
# xbindkeys configuration # | |
########################### | |
# | |
# Version: 1.8.6 | |
# | |
# If you edit this file, do not forget to uncomment any lines | |
# that you change. | |
# The pound(#) symbol may be used anywhere for comments. |