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') | |
| , Image = Canvas.Image | |
| , canvas = new Canvas(400, 400) | |
| , ctx = canvas.getContext('2d') | |
| , fs = require('fs') | |
| var sprite | |
| var hairSprite |
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
| Reading symbols for shared libraries ++++......................................................................................................................................... done | |
| Reading symbols for shared libraries . done | |
| Reading symbols for shared libraries .warning: Could not find object file "/Users/skattyadz/Dropbox/code/node-canvas/pixman-0.28.0/pixman/.libs/pixman.o" - no debug information available for "pixman.c". | |
| warning: Could not find object file "/Users/skattyadz/Dropbox/code/node-canvas/pixman-0.28.0/pixman/.libs/pixman-access.o" - no debug information available for "pixman-access.c". | |
| warning: Could not find object file "/Users/skattyadz/Dropbox/code/node-canvas/pixman-0.28.0/pixman/.libs/pixman-access-accessors.o" - no debug information available for "pixman-access-accessors.c". | |
| warning: Could not find object file "/Users/skattyadz/Dropbox/code/node-canvas/pixman-0.28.0/pixman/.libs/pixman-bits-image.o" - no debug information available for "pixman-bits-image.c". |
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 number = 0; | |
| http.createServer(function (req, res) { | |
| if (req.url == '/') number++; | |
| res.writeHead(200, {'Content-Type': 'text/plain'}); | |
| res.end(number.toString()); | |
| }).listen(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
| # in remote ~/.bashrc | |
| if [ -n "$SSH_CLIENT" ]; then text=" ssh" | |
| fi | |
| export PS1='\[\e[0;35m\]\u@\h:\w${text}$\[\e[m\] ' | |
| # - Colour codes - | |
| # Black 0;30 |
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
| # add to ~/.bash_profile | |
| function sshh() { | |
| local PROJECTNAME=${PWD##*/} | |
| local HOST=$1 | |
| eval "ssh -t ${HOST} \"cd ${PROJECTNAME}; bash\"" | |
| } |
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
| ripped from http://meyerweb.com/eric/tools/dencoder/ | |
| This tool is provided without warranty, guarantee, or much in the way of explanation. Note that use of this tool may or may not crash your browser, lock up your machine, erase your hard drive, or e-mail those naughty pictures you hid in the Utilities folder to your mother. Don't blame me if anything bad happens to you, because it's actually the aliens' fault. The code expressed herein is solely that of the author, and he's none too swift with the JavaScript, if you know what we mean, so it's likely to cause giggle fits in anyone who knows what they're doing. Not a flying toy. Thank you for playing. Insert coin to continue. |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>iOS6 Safari Photo Capture Demo</title> | |
| <script type="text/javascript"> | |
| window.onload = function() { | |
| var input = document.getElementById("input"); | |
| input.addEventListener("change", handleFile); | |
| } |
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
| convert 1.jpg -scale '225x225^' -gravity center -extent 225x225 1-square.jpg |
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
| require 'rubygems' | |
| require 'sinatra' | |
| require 'json' | |
| require 'omniauth' | |
| require 'omniauth-facebook' | |
| require 'omniauth-twitter' | |
| class SinatraApp < Sinatra::Base | |
| configure do | |
| set :sessions, true |
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 i = 0; | |
| var addPhotoInterval = setInterval(function() { | |
| instawall.renderImage(data.data[i++]); | |
| if (i == data.data.length) clearInterval(addPhotoInterval); | |
| }, 10); |