Skip to content

Instantly share code, notes, and snippets.

View thinkclay's full-sized avatar

Clay Unicorn thinkclay

View GitHub Profile
@thinkclay
thinkclay / gist:10038490
Created April 7, 2014 19:44
Up and running with Ubuntu and Rails
apt-get update
apt-get upgrade
apt-get install gcc build-essential git-core mongodb
git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
. ~/.bash_profile
git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
rbenv install -l
rbenv install 2.1.0
import UIKit
import Accounts
import Social
import SwifteriOS
class AuthViewController: UIViewController {
var swifter: Swifter
// Default to using the iOS account framework for handling twitter auth
import UIKit
import SwifteriOS
class TweetsViewController: UITableViewController {
var tweets : [JSONValue] = []
override func viewWillLayoutSubviews()
{
super.viewWillLayoutSubviews()
import SpriteKit
class GameScene: SKScene, SKPhysicsContactDelegate
{
// Our main scene. Everything is added to this for the playable game
var moving: SKNode!
// Our running man! Defaults to a stand still position
var hero: SKSpriteNode! = SKSpriteNode(imageNamed: "runningman1")
@thinkclay
thinkclay / GameScene.swift
Created August 3, 2014 02:50
Jumping action
import SpriteKit
class GameScene: SKScene, SKPhysicsContactDelegate
{
// Our main scene. Everything is added to this for the playable game
var moving: SKNode!
// Our running man! Defaults to a stand still position
let heroAtlas = SKTextureAtlas(named: "hero.atlas")
var hero: SKSpriteNode!
@thinkclay
thinkclay / server.go
Last active September 2, 2024 03:48
Basic Encryption and Decryption with a Golang Web Server Application
package main
import (
"crypto/aes"
"crypto/cipher"
"encoding/base64"
"fmt"
"io/ioutil"
"log"
"net/http"
class DepositsController < BaseController
include Manageable
end
class SingletonClass
{
class var shared : SingletonClass
{
struct Static
{
static let instance : SingletonClass = SingletonClass()
}
​return Static.instance
class CurrencyFactory
{
class func currencyForCountry(country:Country) -> Currency?
{
switch country
{
case .Spain, .France :
return Euro()
case .UnitedStates :
protocol PrintStrategy
{
func printString(string: String) -> String
}