Skip to content

Instantly share code, notes, and snippets.

View chrisschreiner's full-sized avatar

Chris Schreiner chrisschreiner

  • Schpaencoder
  • Oslo, Norway, Europe
View GitHub Profile
import Foundation
import XCPlayground
enum E:ErrorType {
case SomeThingHappened(payload:String)
}
let filename = XCPSharedDataDirectoryPath.stringByAppendingPathComponent("output.plist")
func run(filename:String) throws -> String {
alias emacs="/Applications/Emacs.app/Contents/MacOS/Emacs -nw"
alias gist="gist -c -o"
alias g="gist -P -o"
export sourcecode="/Volumes/Yosemite/Users/chris/Sourcecode/Troup"
export CLICOLOR=1
export LSCOLORS="Ehfxcxdxbxegedabagacad"
echo "Source code is at $sourcecode"
cd $sourcecode
alias ls="ls -lG"
git log
export PS1="\u@\h/\\W: "
commit c644eb99cc42d1608a40a1ccd50b8c15afe059b6
Author: Chris Schreiner <schpaencoder@gmail.com>
Date: Sat Jul 18 19:43:31 2015 +0200
> This is how things are now:
> #gss = GameController.stateMachineController.stateMachineDict
#gs = GameController.stateMachineController
* DummyView2.identity(set) -> gss[identity] = StateMachine() -> DummyView2.someAction = gs -> DONE

What is this?

Short text about what this is all about.

System contents

AppDelegate
@ statusBar (awakeFromNib)

ViewController
import Foundation
public typealias GistID = Int
public typealias Result = Int
public typealias ConfigDict = [String:String]
public class GistWriter { // when you create the instance it will be invalid
private var activeGist: GistID?
//
// GistServiceSpec.swift
// XXXX
//
// Created by Chris Patrick Schreiner on 09/08/15.
// Copyright © 2015 Chris Patrick Schreiner. All rights reserved.
//
import Foundation
import Quick
(defn range-without-zero [from to]
(filter #(not (= 0 %)) (range from to)))
(def my-range (range-without-zero -8 9))
(def t-map-licoresse
(let [r (filter #(not (= 0 %)) (range -8 9))]
(concat (for [x r] [x -1])
(for [x (reverse r)]
[x 1]))))
(use 'clojure.walk)
(defmacro with-iota [& body]
"Provides the local 'iota' which starts at 0 and automatically self-increments"
(let [iota (gensym "whatever-")]
`(let [~iota ~(atom -1)]
~@(map #(postwalk-replace {'iota `(swap! ~iota inc)} %) body))))
(with-iota
(let [a iota
@chrisschreiner
chrisschreiner / recent-file-jump.el
Created April 13, 2010 19:05
Jump to recent file via Ctrl-#
(defvar shortcut-list '(1 2 3 4 5))
(defun unset-numeric-shortcuts (list)
(mapcar
'(lambda (n)
(global-unset-key (read-kbd-macro (format "C-%d" n))))
list))
(unset-numeric-shortcuts shortcut-list)