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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>name</key> | |
| <string>Xcode-ish</string> | |
| <key>settings</key> | |
| <array> | |
| <dict> | |
| <key>settings</key> |
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
| #!/usr/local/bin/bash | |
| curl -s https://developer.apple.com/videos/wwdc/2015/ -o source.html | |
| grep "?id=" source.html | grep -v "video center" | sed -E 's/(.*)(\?id=[0-9]+).*/\2/g' | sort | uniq > video_links.txt | |
| rm source.html | |
| cat video_links.txt | while read line | |
| do | |
| url="https://developer.apple.com/videos/wwdc/2015/$line" | |
| curl -s $url -o video.html | |
| title=$(grep "<h3>" video.html | sed -E 's/<h3>|<\/h3>//g' | sed -e 's/^[ \t]*//') |
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
| #!/bin/bash | |
| # usage: get [ RESOLUTION [ YEAR [ IDS... ] ] ] | |
| resolution=${1:-SD} | |
| year=${2:-2015} | |
| shift | |
| shift | |
| ids=$* | |
| RESOLUTION=$(echo $resolution | tr '[:lower:]' '[:upper:]') |
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
| // Change these settings | |
| var username = 'myname', | |
| password = 'mypass', | |
| pin = [0,0,0,0]; | |
| // Auto-login | |
| var login = setInterval(function(){ | |
| if ($('form#user-account-form').length) { | |
| clearInterval(login); | |
| $('input#username').val(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
| require "Subprocess" | |
| require "tmpdir" | |
| # | |
| # Currently will only convert a single swift code file into a static library | |
| # and cannot include any Objective-C code. | |
| # | |
| # Usage: generate("/path/to/MyCode.swift", :ios) | |
| # | |
| def generate(file, platform, dst=nil) |
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
| # IMPORTANT SETUP INSTRUCTIONS: | |
| # | |
| # 1. Go to http://www.dropbox.com/developers/apps (log in if necessary) | |
| # 2. Select "Create App" | |
| # 3. Select the following settings: | |
| # * "Dropbox API app" | |
| # * "Files and datastores" | |
| # * "(No) My app needs access to files already on Dropbox" | |
| # * "All file types" | |
| # * (Choose any app name) |
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
| import Foundation | |
| operator infix =~ {} | |
| func =~ (input: String, pattern: String) -> String[]? { | |
| let regex = NSRegularExpression(pattern: pattern, options: .CaseInsensitive, error: nil) | |
| let results = regex.matchesInString(input, | |
| options: nil, | |
| range: NSMakeRange(0, countElements(input)) |
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
| // | |
| // Trie.swift | |
| // SceneTest | |
| // | |
| // Created by Greg Titus on 6/7/14. | |
| // Copyright (c) 2014 The Omni Group. All rights reserved. | |
| // | |
| // This is essentially the same data structure as OFTrie in OmniFoundation, except that the OmniFoundation version is mutable and ephemeral, | |
| // and this version is immutable and persistent. Every time you add a string to the trie, it replaces all the nodes along the string's path |
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
| var five = require("johnny-five"); | |
| five.Board().on("ready", function() { | |
| // Defaults to pin 11 (must be PWM) | |
| var led = new five.Led(process.argv[2] || 11); | |
| // Pulse the LED every half second | |
| console.log("led.pulse(500)"); | |
| led.pulse(500); |
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
| var five = require("johnny-five"); | |
| five.Board().on("ready", function() { | |
| // Defaults to pin 13 | |
| var led = new five.Led(process.argv[2] || 13); | |
| // Turn on the LED | |
| console.log("led.on()"); | |
| led.on(); |