Skip to content

Instantly share code, notes, and snippets.

/**
* Documentation: http://docs.azk.io/Azkfile.js
*/
// Adds the systems that shape your system
systems({
magnetis: {
// Dependent systems
depends: ["postgres", "redis", "elasticsearch"],
// More images: http://images.azk.io
# The container includes:
#
# azukiapp/ruby:
# * MRI Ruby 2.1.4
# * Bundler
# * Image Magick
#
FROM azukiapp/node
MAINTAINER Azuki <support@azukiapp.com>
<%
require 'cgi'
require 'uri'
begin
uri = URI.parse(ENV["DATABASE_URL"])
rescue URI::InvalidURIError
raise "Invalid DATABASE_URL"
end
@lucasprag
lucasprag / README.md
Last active August 29, 2015 14:22 — forked from haggen/README.md

Get boot2docker working with nfs instead of vboxsf.

Tested on:

- Boot2Docker-cli version: v1.6.0
  Git commit: 9894ae9
- Boot2Docker-cli version: v1.6.2
  Git commit: cb2c3bc
@lucasprag
lucasprag / GameScene.swift
Last active January 28, 2016 19:59
Blog Post Snippet
import SpriteKit
class GameScene: SKScene {
let floor = SKSpriteNode(imageNamed: "blue")
override func didMoveToView(view: SKView) {
}
}
@lucasprag
lucasprag / GameScene.swift
Last active January 28, 2016 20:08
Creating a floor in the GameScene
import SpriteKit
class GameScene: SKScene {
let floor = SKSpriteNode(imageNamed: "blue")
override func didMoveToView(view: SKView) {
setupFloor()
}
func setupFloor() {
@lucasprag
lucasprag / GameScene.swift
Last active January 29, 2016 19:40
Creating a player in the GameScene
import SpriteKit
class GameScene: SKScene {
let floor = SKSpriteNode(imageNamed: "blue")
let player = SKSpriteNode(imageNamed: "orange")
override func didMoveToView(view: SKView) {
setupFloor()
setupPlayer()
}
@lucasprag
lucasprag / GameScene.swift
Created January 29, 2016 11:55
Simple enum to help us to use the physics body
import SpriteKit
enum Physics {
static let Character: UInt32 = 0b1 // 1
static let Floor : UInt32 = 0b10 // 2
}
class GameScene: SKScene {
// omitted
}
@lucasprag
lucasprag / GameScene.swift
Created January 29, 2016 12:03
The power of the physics body
// omitted
class GameScene: SKScene {
// omitted
func setupPlayer() {
// omitted
// we create a physics body with the size of the player
player.physicsBody = SKPhysicsBody(rectangleOfSize: player.size)
// yes, it's that simple to be affected by gravity
@lucasprag
lucasprag / GameScene.swift
Last active January 29, 2016 12:22
Touch me to impulse
// omitted
class GameScene: SKScene {
// omitted
override func didMoveToView(view: SKView) {
// omitted
}
// This method is called when the user touches the screen
override func touchesBegan(touches: Set<UITouch>, withEvent event: UIEvent?) {
// we apply an impulse to the axis Y of 70