First create a Ubuntu 13.04 x64 droplet on DigitalOcean Control Panel
Then ssh with root account, run this in termianl:
$ wget -qO- https://raw.github.com/progrium/dokku/master/bootstrap.sh | sudo bash
package text { | |
import flash.text.TextFormat; | |
public class SimpleFormat extends TextFormat { | |
public function SimpleFormat(options:Object):void { | |
for(var k:Object in options) { | |
if(this.hasOwnProperty(k)) { | |
this[k] = options[k]; | |
} | |
} |
package { | |
import flash.display.Sprite; | |
import flash.text.Font; | |
import flash.text.TextField; | |
import flash.text.TextFormat; | |
public class FontDetector extends Sprite { | |
[SWF(width='640', height='480', backgroundColor='#FFFFFF', frameRate='60', pageTitle="What fonts are on your system?")] | |
public function FontDetector():void { |
// util/log.as | |
package util { | |
import flash.system.Security; | |
import flash.external.ExternalInterface; | |
public function log(message:String):void { | |
flash.system.Security.allowDomain('*'); | |
flash.system.Security.allowInsecureDomain('*'); | |
ExternalInterface.call('console.log', message); | |
} | |
} |
game.CharacterFromRPGMakerSpritesheet = me.ObjectEntity.extend({ | |
init: function(x, y, settings) { | |
this.parent(x, y, settings); | |
this.renderable.addAnimation("stand-down", [0]); | |
this.renderable.addAnimation("down", [0, 1, 2, 3], 3); | |
this.renderable.addAnimation("stand-up", [12]); | |
this.renderable.addAnimation("up", [12, 13, 14, 15], 3); |
function MatrixIndexOf(matrix, object) { | |
for(var i = 0; i < matrix.length; i++) { | |
for(var j = 0; j < matrix[i].length; j++) { | |
if(matrix[i][j] === object) { | |
return [i, j]; | |
} | |
} | |
} | |
return -1; | |
} |
// This helper function lets you make sure that if you're in a situation with a lot of log statements (like inside a loop), | |
// you'll only see a maximum of MAXIMUM_DUPLICATE_LOG_MESSAGES with the same message before they're quietly discarded. | |
// (I find it helps with debugging) | |
var counts = {} | |
var MAXIMUM_DUPLICATE_LOG_MESSAGES = 10; | |
function log(message) { | |
if(counts.hasOwnProperty(message)) { | |
counts[message]++; | |
} else { | |
counts[message] = 0; |
#!/usr/bin/env python | |
from StringIO import StringIO | |
import csv | |
DUMMY_CSV = """ | |
huh, wat, etc | |
huh, wat, etc | |
""" |
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'bundler/setup' | |
require 'aws/s3' | |
require 'uri' | |
AWS::S3::Base.establish_connection!( | |
:access_key_id => ENV['AWS_ACCESS_KEY_ID'], |
require 'tilt' | |
template = Tilt.new('views/emails/albums.erb') | |
template.instance_variable_set(:@default_encoding, 'utf-8') | |
context = { | |
:hi => 'hello', | |
} | |
html_content = template.render(binding, context) |