Skip to content

Instantly share code, notes, and snippets.

<?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>
@jherran
jherran / gist:d45792c55b66293c45b5
Last active August 4, 2023 23:48
Download and label all WWDC 2015 videos
#!/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]*//')
@idiomatic
idiomatic / wwdc.sh
Last active April 10, 2022 03:52
Fetch WWDC videos, slides, and sample code.
#!/bin/bash
# usage: get [ RESOLUTION [ YEAR [ IDS... ] ] ]
resolution=${1:-SD}
year=${2:-2015}
shift
shift
ids=$*
RESOLUTION=$(echo $resolution | tr '[:lower:]' '[:upper:]')
@suderman
suderman / userscript.js
Last active April 20, 2022 04:41
Plex Fluid userscript
// 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);
@robertjpayne
robertjpayne / SwiftStaticCompile.rb
Last active April 23, 2017 15:40
A ruby function to generate a static library + clang module from a single Swift source file
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)
@omz
omz / Dropbox File Picker.py
Last active November 16, 2025 11:09
Dropbox File Picker.py
# 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)
@KingOfBrian
KingOfBrian / gist:8d2c6d85cb4079aabde6
Last active January 27, 2016 19:11
Swift Regex matches
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))
anonymous
anonymous / Trie.swift
Created June 7, 2014 07:23
//
// 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
@Resseguie
Resseguie / led-analog.js
Last active August 29, 2015 14:02
demo basic LED analog methods
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);
@Resseguie
Resseguie / led-digital.js
Last active August 29, 2015 14:02
demo basic LED digital methods
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();