This file contains 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
(ns immutant.init | |
(:use irxcontrolcenter.core) | |
(:require [immutant.messaging :as messaging] | |
[immutant.web :as web] | |
[immutant.util :as util] | |
[ring.middleware.resource :as ring-resource]) | |
) | |
;; This file will be loaded when the application is deployed to Immutant, and |
This file contains 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
#!/bin/bash | |
# run this file by chmod 755 generate.sh | |
# and then (in the same path as the xslt files) | |
# ./generate.sh someoutputfile PATHTOSTORYBOARD | |
# | |
xsltproc segue-h.xslt $2 > ${1}.h | |
xsltproc segue-m.xslt $2 > ${1}.m |
This file contains 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
package main | |
import "fmt" | |
type AThing struct { | |
Public string | |
private int64 | |
} | |
func (a *AThing) ireturn(onearg int64) (int64, error) { |
This file contains 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
tell application "Xcode" | |
quit | |
end tell | |
delay 10 -- Wait for Xcode to close | |
tell application "Xcode" to activate |
This file contains 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
#!/usr/bin/env bash | |
# | |
# Copyright (c) 2012 Jonathan Penn (http://cocoamanifest.net) | |
# Gist: https://gist.github.com/1402258 | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is |
This file contains 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
use_module(library(http/http_client)). | |
use_module(library(http/http_open)). | |
use_module(library(xpath)). | |
http_open('http://www.codemash.org/rest/speakers', In, []), | |
load_xml_file(In,Out), | |
close(In). | |
http_open('http://www.codemash.org/rest/speakers', In, []), |
This file contains 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
(ns newsite.views.welcome | |
(:require [newsite.views.common :as common] | |
[noir.session :as session] | |
[noir.server :as server] | |
[noir.response :as response]) | |
(:use [noir.core :only [defpage]] | |
[hiccup.core :only [html]])) | |
(defn- log [msg & vals] | |
(let [line (apply format msg vals)] |
This file contains 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 'yaml' | |
class Tumbledry | |
attr_accessor :patterns | |
def initialize | |
File.open('repetative.txt', 'r') do |f| | |
@data = f.read() | |
end | |
self.patterns = {} | |
@numpat = 1 | |
end |
This file contains 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
class Conway | |
attr_reader :displayrange | |
attr_accessor :board | |
# Any live cell with fewer than two live neighbours dies, as if caused by under-population. | |
# Any live cell with two or three live neighbours lives on to the next generation. | |
# Any live cell with more than three live neighbours dies, as if by overcrowding. | |
# Any dead cell with exactly three live neighbours becomes a live cell, as if by reproduction. | |
def initialize disprange = nil | |
@board = { 1 => { 2 => 1}, 2 => { 2 => 1}, 3 => { 2 => 1} } | |
@displayrange = disprange.nil? ? (0..10) : disprange |
This file contains 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
enum PhoneType { | |
MOBILE, | |
HOME, | |
OFFICE | |
} | |
struct PhoneNumber { | |
1: PhoneType ptype, | |
2: string name, | |
3: string number |