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
#!/usr/bin/env python | |
# -- coding: utf-8 -- | |
"""Deployment script. | |
This script is coded so it can make the deployments automagically in the | |
designed servers, it also works as a documentation of where are the programs | |
installed. | |
USE: fab <hosts>:<username> <action> | |
EX: fab staging:admin release |
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
# Copyright (C) 2005-2010 Canonical Ltd | |
# | |
# This program is free software; you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation; either version 2 of the License, or | |
# (at your option) any later version. | |
# | |
# This program is distributed in the hope that it will be useful, | |
# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
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
npm ERR! error linking, rollback Error: No satisfying version found for 'request'@'>=1.2.0' | |
npm ERR! error linking, rollback Valid install targets for request: "latest", "0.10.0", "0.8.3", "0.9.0", "0.9.1", "0.9.5", "1.0.0" | |
npm ERR! error linking, rollback at /home/tutuca/lib/node/.npm/npm/0.2.16/package/lib/install.js:143:29 | |
npm ERR! error linking, rollback at /home/tutuca/lib/node/.npm/npm/0.2.16/package/lib/install.js:178:5 | |
npm ERR! error linking, rollback at /home/tutuca/lib/node/.npm/npm/0.2.16/package/lib/utils/registry/get.js:55:5 | |
npm ERR! error linking, rollback at /home/tutuca/lib/node/.npm/npm/0.2.16/package/lib/utils/registry/request.js:37:10 | |
npm ERR! error linking, rollback at IncomingMessage.<anonymous> (/home/tutuca/lib/node/.npm/npm/0.2.16/package/lib/utils/registry/request.js:174:14) | |
npm ERR! error linking, rollback at IncomingMessage.emit (events.js:59:20) | |
npm ERR! error linking, rollback at HTTPParser.onMessageComplete (http.js:111:23) | |
npm ERR! error linking, roll |
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
$ drty-admin startproject potaje | |
node.js:114 | |
throw e; // process.nextTick error, or 'error' event on first tick | |
^ | |
Error: Cannot find module 'hashlib' | |
at Function._resolveFilename (module.js:198:11) | |
at Function._load (module.js:156:25) | |
at require (module.js:225:19) | |
at /home/tutuca/lib/node/.npm/drty/0.0.1/package/lib/contrib/facebook/index.js:4:12 |
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
(function($){ | |
$.fn.corrector = function(options) { | |
var defaults = { | |
'withespace': ' ', | |
'doublespace': ' ', | |
}; | |
var options = $.extend(defaults, options); | |
return this.each(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
<?php | |
$dir = glob("*.gif"); | |
header('Content-Type: image/gif'); | |
echo file_get_contents($dir[array_rand($dir)]); //file_get_contents streams the file directly as gd's Image | |
// does not support animated gifs | |
?> |
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
public static List GenerateColors_Harmony( | |
int colorCount, | |
float offsetAngle1, | |
float offsetAngle2, | |
float rangeAngle0, | |
float rangeAngle1, | |
float rangeAngle2, | |
float saturation, float luminance) | |
{ | |
List colors = new List(); |
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
describe("Test sinon.fakeTimes with Moment.js", function() { | |
var today, tomorrow, ticks, clock; | |
beforeEach(function(){ | |
// get milliseconds since UNIX epoch for this date. | |
ticks = parseInt(moment('01/15/2015').format('x')); | |
// set the timers to start at expected time. | |
clock = sinon.useFakeTimers(ticks); | |
}); | |
afterEach(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
var webpack = require('webpack'); | |
module.exports = function (grunt) { | |
'use strict'; | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
lib: './node_modules', | |
src: './assets', | |
out: './app/static/coso', |
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
define([ | |
], function() { | |
return { | |
componentDidMount: function() { | |
this._boundForceUpdate = this.forceUpdate.bind(this, null); | |
this.getBackboneObject().on("all", this._boundForceUpdate, this); | |
}, | |
componentWillUnmount: function() { | |
this.getBackboneObject().off("all", this._boundForceUpdate); | |
}, |
OlderNewer