I hereby claim:
- I am thelbane on github.
- I am thelbane (https://keybase.io/thelbane) on keybase.
- I have a public key whose fingerprint is E1FE 13BD BE9A E0C1 EB39 9429 05B1 B056 3DF7 801A
To claim this, I am signing this object:
| # The name of the destination disk image | |
| IMAGE_TARGET = tetris.dsk | |
| # Apple II command issued by the "run" recipe after booting the disk image. | |
| RUN_CMD = "BRUN TETRIS" | |
| # Paths and flags for build/processing applications | |
| DASM = dasm | |
| DASM_FLAGS = -v0 -f2 | |
| AC = java -jar /usr/local/bin/ac.jar |
| import Foundation | |
| enum ColumnSelection<Item> where Item: Hashable { | |
| case viewAll | |
| case selection(item: Item) | |
| } | |
| extension ColumnSelection: Hashable { |
| import Foundation | |
| class KVOChangeNotifier: NSObject { | |
| weak var object: AnyObject? | |
| let keyPaths: [String] | |
| var dependentObject: AnyObject | |
| let dependentKeyPaths: [String] | |
| init(object: AnyObject, keyPaths: [String], dependentObject: AnyObject, dependentKeyPaths: [String]) { | |
| self.object = object | |
| self.keyPaths = keyPaths |
| public class ObservableTests : XCTestCase { | |
| public func testFilters() { | |
| var expectedValues = [0,2,4,6,8] | |
| let expect = expectation(description: "Odd numbers filtered out") | |
| expect.expectedFulfillmentCount = UInt(expectedValues.count) | |
| let observable = Observable(0) | |
| observable |
| //: Playground - noun: a place where people can play | |
| import UIKit | |
| var str = "Hello, playground" | |
| class Person: NSObject { | |
| dynamic var firstName: String | |
| dynamic var lastName: String | |
| init(_ fn: String, _ ln: String) { |
| func validate(input: String) -> Bool { | |
| let brackets: [Character:Character] = ["[":"]","(":")","{":"}"] | |
| var stack: [Character] = [] | |
| for char in input.characters { | |
| if let correspondingBracket = brackets[char] { | |
| stack.append(correspondingBracket) | |
| } else if stack.last == char { | |
| stack.popLast() | |
| } else if brackets.values.contains(char) { |
I hereby claim:
To claim this, I am signing this object:
| ; TO PLAY A TONE FROM APPLESOFT... | |
| ; POKE 769,DURATION : POKE 771,FREQUENCY : CALL 768 | |
| 0300- A0 64 LDY #$FF ; LOAD DURATION | |
| 0302- A9 01 LDA #$FF ; LOAD FREQUENCY | |
| 0304- 85 FA STA $FA ; VALUE AT $FA WILL SLIDE DOWN, CREATING THE VIOLIN EFFECT | |
| 0306- AE 03 03 LDX $0303 ; INITIALIZE TONE COUNTER WITH FREQUENCY | |
| 0309- E4 FA CPX $FA ; COMPARE WITH SLIDING VALUE | |
| 030B- D0 03 BNE $0310 ; SKIP SPEAKER CLICK IF NOT EQUAL | |
| 030D- AD 30 C0 LDA $C030 ; CLICK SPEAKER |
| #pragma mark - Static | |
| #pragma mark - Init/Dealloc | |
| #pragma mark - Properties | |
| #pragma mark - Public | |
| #pragma mark - Private |
| // A bot for this silly demo: http://www.webdeveloperjuice.com/demos/jquery/snake_jquery.html | |
| // Compile with http://closure-compiler.appspot.com/home set to Advanced Optimization | |
| // | |
| // Automatically runs when compiled statement is pasted into console. Type "win()" to run it again. | |
| (window['win'] = function () { | |
| // direction mappings | |
| var i, dirs = ['up', 'right', 'down', 'left'], | |
| diffs = [[-1, 0], [0, 1], [1, 0], [0, -1]]; // don't ask me why the coords are ordered [y,x] | |
| window['t'] = 1; // next Turn direction if we hit a wall (opposite of last turn direction) | |
| window['m'] = 0; // My internally tracked direction |