This file contains hidden or 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
/* | |
File: Reachability.h | |
Abstract: Basic demonstration of how to use the SystemConfiguration Reachablity APIs. | |
Version: 2.2 - ARCified | |
Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Inc. | |
("Apple") in consideration of your agreement to the following terms, and your | |
use, installation, modification or redistribution of this Apple software |
This file contains hidden or 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
<xsd:schema xmlns:xsd="http://www.w3.org/2011/XMLSchema"> | |
<xsd:complexType name = "codeFragment"> | |
<xsd:attribute name="language", type ="xsd:string", default="JAVA" /> | |
<xsd:sequence> | |
<xsd:element name="author" type="xsd:string" minOccurs="1", maxOccurs="1" /> | |
<xsd:element name = "title", type="xsd:string", minOccurs="1", maxOccurs="1" /> | |
<xsd:element name="date", type ="xsd:date", minOccurs="1", maxOccurs="1" /> | |
<xsd:element name="code", type="xsd:string", minOccurs="1", maxOccurs="1" /> | |
</xsd:sequence> | |
</xsd:complexType> |
This file contains hidden or 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
def app_path | |
ENV['APP_BUNDLE_PATH'] || (defined?(APP_BUNDLE_PATH) && APP_BUNDLE_PATH) | |
end | |
Given /^I launch the app using iOS (\d\.\d) and the (iphone|ipad) simulator$/ do |sdk, version| | |
launch_app app_path, sdk, version | |
end |
This file contains hidden or 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
[SPSession initializeSharedSessionWithApplicationKey:[NSData dataWithBytes:&g_appkey length:g_appkey_size] userAgent:@"MaxWoolf.SpotifyRadio" loadingPolicy:SPAsyncLoadingManual error:&mainError] |
This file contains hidden or 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 Person | |
def initialize(name) | |
@name = name | |
end | |
def name | |
puts @name | |
end |
This file contains hidden or 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
let rightTriangles = [ (a,b,c) | c <- [1..10], b <- [1..10], a <- [1..10], a^2 + b^2 == c^2, a+b+c == 24 ] | |
circumference' :: Float -> Float | |
circumference' r = 2*pi*r |
This file contains hidden or 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
def get_current_branch | |
b = `git branch`.split("\n").delete_if { |i| i[0] != "*" } | |
current_branch = b.first.split(" ").last | |
end | |
def get_origin_remote | |
`git remote -v`.split("\n").delete_if { |i| i[0..5] != 'origin' }.first | |
end | |
def get_github_username |
This file contains hidden or 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
def humanised_time | |
if milliseconds < 60000 | |
"#{ milliseconds / 1000 }sec" | |
elsif milliseconds > 60000 && milliseconds < 3600000 | |
"#{ ((milliseconds / (1000 * 60)) % 60) }m #{ (milliseconds / 1000) % 60 }s" | |
else | |
"#{ ((milliseconds / (1000 * 60 * 60)) % 24) }h #{ ((milliseconds / (1000 * 60)) % 60) }m #{ (milliseconds / 1000) % 60 }s" | |
end | |
end |
This file contains hidden or 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
guard 'shell' do | |
watch(/(.*).(m|h|mm|hh)/) do | |
puts "Change detected. Running tests..." | |
`../xctool/xctool.sh -project XCodeProject.xcodeproj -scheme MainScheme test -reporter plain` | |
end | |
end |
OlderNewer