Skip to content

Instantly share code, notes, and snippets.

@clooth
clooth / sfml.rb
Last active December 23, 2015 09:28 — forked from blt/sfml.rb
require 'formula'
# Documentation: https://github.com/mxcl/homebrew/wiki/Formula-Cookbook
# PLEASE REMOVE ALL GENERATED COMMENTS BEFORE SUBMITTING YOUR PULL REQUEST!
class Sfml < Formula
homepage 'http://www.sfml-dev.org'
version '2.0'
url 'http://www.sfml-dev.org/download/sfml/2.1/SFML-2.1-sources.zip'
@clooth
clooth / sfml.rb
Last active December 23, 2015 09:28 — forked from blt/sfml.rb
require 'formula'
# Documentation: https://github.com/mxcl/homebrew/wiki/Formula-Cookbook
# PLEASE REMOVE ALL GENERATED COMMENTS BEFORE SUBMITTING YOUR PULL REQUEST!
class Sfml < Formula
homepage 'http://www.sfml-dev.org'
version '2.0'
url 'http://www.sfml-dev.org/download/sfml/2.1/SFML-2.1-sources.zip'
@clooth
clooth / gist.m
Created September 11, 2013 13:47
Thumbnail generator from assets
- (CGImageRef)thumbnailImageForAsset:(ALAsset *)asset
maxPixelSize:(NSUInteger)size
{
NSParameterAssert(asset != nil);
NSParameterAssert(size > 0);
ALAssetRepresentation *assetRepresentation = [asset defaultRepresentation];
CGDataProviderDirectCallbacks callbacks = {
.version = 0,
Nicos-MacBook-Pro:ggbuilds nico$ go build *.go
# command-line-arguments
./write_json.go:1: missing return at end of function
package main
import (
"encoding/json"
"log"
"net/http"
"strconv"
)
func writeJson(rw http.ResponseWriter, v interface{}) {
package main
import (
"encoding/json"
"log"
"net/http"
"strconv"
)
func writeJson(rw http.ResponseWriter, v interface{}) {
@clooth
clooth / gg.go
Created September 10, 2013 08:57
// Available races
type Race string
const (
Protoss Race = "protoss"
Terran Race = "terran"
Zerg Race = "zerg"
)
func (r *Race) iconFileURL() string {
// TODO:
@clooth
clooth / gg.go
Created September 10, 2013 08:52
// Build struct
type Build struct {
Name string // Short name for this build
Description []byte // Description explaining what the build is about
PlayerRace Race // The race this built is meant to be played with
OpposingRaces []Race // The target races this build works well against
}
@clooth
clooth / gg.go
Created September 10, 2013 08:45
Enums
type Race string
const (
Protoss Race = "protoss"
Terran Race = "terran"
Zerg Race = "zerg"
)
@clooth
clooth / router.js.coffee
Created September 9, 2013 09:20
Ember Routes
Terrest.Router.reopen
location: 'history'
Terrest.Router.map ->
@resource "builds", path: "/builds/:build_race", ->
@resource "build", path: ":build_slug"