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/guile -s | |
!# | |
;solution to Drive Ya Nuts http://www.samstoybox.com/toys/DriveYaNuts.html | |
(use-modules (ice-9 format)) | |
(define nut (lambda (numbers) | |
(define center -1) | |
(define position 0) | |
(define get-numbers (lambda () numbers)) |
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
0x8634187E1528eBdc652a4eCAABBD3a40fdc12F61 |
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
0x2E3Df650Bb8B6c83D17932c90f62b5394A9a6948 |
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
0x4BD8b52Ca2908b46210e26d55fdC5e4E24197FD0 |
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
post_install do |installer| | |
installer.pods_project.targets.each do |target| | |
target.build_configurations.each do |config| | |
if config.name == 'Debug' | |
config.build_settings['OTHER_SWIFT_FLAGS'] ||= ['$(inherited)', '-D DEBUG'] | |
end | |
end | |
end | |
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
#!/usr/bin/env bash | |
# Build open source Swift in a specified directory after cloning the appropriate Github repos. | |
# Select an alternative Github account (such as hpux735 for William Dillon's forks) to clone swift, swift-llvm, swift-lldb, and swift-corelibs-foundation repos from. | |
ALTREPO="apple" | |
# Interval for collecting vmstat, df, and CPU temperature data | |
STATINTERVAL=300 |
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
import UIKit | |
class Notify { | |
class func resetEventCount() { | |
eventCount = 0; | |
UIApplication.sharedApplication().applicationIconBadgeNumber = 0 | |
} | |
class func withMessage(message:String) { |
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 climbing | |
(:require [clojure.string :as string]) | |
) | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; part a ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
; Each mountain block has 2 children it follows that for a mountain of size n | |
; the total paths will equal total number of block sequences from top to base | |
; taking one from each row which is given by p=2^(n-1) | |
(defn simple-path-count |
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
protocol Thing { | |
typealias argType | |
func doit(val:argType) -> argType | |
} | |
class IntThing : Thing { | |
func doit(val: Int) -> Int { | |
return val + 1 | |
} | |
} |
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
[serviceProfile createCharacteristicWithUUID:<#UUID#> | |
name:<#name#> | |
andProfile:^(BlueCapCharacteristicProfile* characteristicProfile) { | |
characteristicProfile.properties = CBCharacteristicPropertyRead | CBCharacteristicPropertyWrite; | |
[characteristicProfile serializeObject:^NSData*(id data) { | |
return nil; | |
}]; | |
[characteristicProfile afterDiscovered:^(BlueCapCharacteristic* chararacteristic) { | |
}]; | |
[characteristicProfile deserializeData:^NSDictionary*(NSData* data) { |
NewerOlder