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
{ | |
"author": "Elad Ben-Israel <[email protected]>", | |
"name": "mylittlepaas", | |
"description": "Root repository of my little PaaS", | |
"version": "0.0.0", | |
"repository": { | |
"type": "git", | |
"url": "git://github.com/eladb/mylittlepaas.git" | |
}, | |
"main": "app", |
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
$ npm install | |
npm http GET https://registry.npmjs.org/asciimo/0.3.1 | |
npm http 200 https://registry.npmjs.org/asciimo/0.3.1 | |
npm http GET https://registry.npmjs.org/asciimo/-/asciimo-0.3.1.tgz | |
npm http 200 https://registry.npmjs.org/asciimo/-/asciimo-0.3.1.tgz | |
npm WARN excluding symbolic link fonts/Cursive.flf -> slscript.flf | |
npm http GET https://registry.npmjs.org/colors | |
npm http 304 https://registry.npmjs.org/colors | |
[email protected] ./node_modules/asciimo | |
└── [email protected] |
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 http = require('http'); | |
var urlparse = require('url').parse; | |
var asciimo = require('asciimo').Figlet; | |
http.createServer(function(req, res) { | |
if (req.url === '/mysupersecretdeploymentendpoint' && req.method === 'POST') { | |
console.log('Post-receive trigger. Exiting in 1.5 second'); | |
setTimeout(function() { process.exit(1); }, 1500); | |
return res.end(); | |
} |
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
$ git add app.js npm-shrinkwrap.json package.json | |
$ git commit -m 'asciimo' | |
[master d901bff] asciimo | |
3 files changed, 24 insertions(+), 3 deletions(-) | |
create mode 100644 npm-shrinkwrap.json | |
$ git push origin master | |
Counting objects: 8, done. | |
Delta compression using up to 4 threads. |
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
$ curl http://ec2xxx.compute.amazonaws.com | |
# # ###### # # #### # # #### ##### # ##### | |
# # # # # # # # # # # # # # # # | |
###### ##### # # # # # # # # # # # # # | |
# # # # # # # ### # ## # # # ##### # # # | |
# # # # # # # ### ## ## # # # # # # # | |
# # ###### ###### ###### #### # # # #### # # ###### ##### |
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
#!/bin/bash | |
# install node and friends | |
apt-add-repository -y ppa:chris-lea/node.js | |
apt-get update | |
apt-get install -y python-software-properties nodejs npm git make g++ | |
# install girror (https://github.com/eladb/node-girror) | |
npm install -g girror |
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
// a simple drawing function | |
module.exports = function(ctx) { | |
ctx.fillStyle = 'red'; | |
ctx.fillRect(10, 10, 100, 100); | |
ctx.fillStyle = 'blue'; | |
ctx.fillRect(20, 20, 80, 80); | |
}; |
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 = require('canvas'); | |
var hello = require('./hello'); | |
// tests the `hello` rendering function | |
module.exports = function() { | |
var canvas = new Canvas(120, 120); | |
var ctx = canvas.getContext('2d'); | |
// call `hello` to do it's magic | |
hello(ctx); |
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
// a simple drawing function | |
module.exports = function(ctx) { | |
ctx.fillStyle = 'red'; | |
ctx.fillRect(10, 10, 100, 100); | |
ctx.fillStyle = 'blue'; | |
ctx.fillRect(20, 20, 90, 90); // make inner box bigger | |
}; |
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
#!/bin/bash | |
mkdir -p ~/uijsdev | |
cd ~/uijsdev | |
git clone [email protected]:eladb/uijs | |
git clone [email protected]:eladb/uijs-controls | |
git clone [email protected]:eladb/uijs-devtools | |
cd uijs-devtools | |
npm install -g . | |
cd ../uijs | |
npm link |