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
# Minimal example of getting a PostgREST API running from scratch for | |
# testing purposes. It uses docker to launch a postgres database and | |
# a postgrest api server. | |
# This should not be used to deploy a production system but to | |
# understand how postgrest works. In particular there is no security | |
# implemented, see the docs for more. | |
# https://postgrest.org/en/v4.4/ |
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
/// Playing Apple Special Event September 2015 in Playground on Xcode 7.1 beta 3 | |
/// Work load will be lowest when Platform = "OS X" | |
import AVFoundation | |
import AVKit | |
import XCPlayground | |
protocol Playable: XCPlaygroundLiveViewable { | |
var player: AVPlayer? {get set} | |
} |
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
// | |
// ArrayDiff.swift | |
// | |
// Created by Frank A. Krueger on 6/30/15. | |
// Copyright © 2015 Krueger Systems, Inc. All rights reserved. | |
// License: MIT http://opensource.org/licenses/MIT | |
// | |
import Foundation |
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
# You don't need Fog in Ruby or some other library to upload to S3 -- shell works perfectly fine | |
# This is how I upload my new Sol Trader builds (http://soltrader.net) | |
# Based on a modified script from here: http://tmont.com/blargh/2014/1/uploading-to-s3-in-bash | |
S3KEY="my aws key" | |
S3SECRET="my aws secret" # pass these in | |
function putS3 | |
{ | |
path=$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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# Localize.py - Incremental localization on XCode projects | |
# João Moreno 2009 | |
# http://joaomoreno.com/ | |
# Modified by Steve Streeting 2010 http://www.stevestreeting.com | |
# Changes | |
# - Use .strings files encoded as UTF-8 |
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
// | |
// LoggingPrint.swift | |
// | |
import Foundation | |
/** | |
Prints the filename, function name, line number and textual representation of `object` and a newline character into | |
the standard output if the build setting for "Active Complilation Conditions" (SWIFT_ACTIVE_COMPILATION_CONDITIONS) defines `DEBUG`. |
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
/// Observes a run loop to detect any stalling or blocking that occurs. | |
/// | |
/// This class is thread-safe. | |
@interface GHRunLoopWatchdog : NSObject | |
/// Initializes the receiver to watch the specified run loop, using a default | |
/// stalling threshold. | |
- (id)initWithRunLoop:(CFRunLoopRef)runLoop; | |
/// Initializes the receiver to detect when the specified run loop blocks for |
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
#!/bin/sh | |
MERGEPBX_TARGET=mergepbx | |
MERGEPBX_PREFIX=/usr/local/bin | |
MERGEPBX_BUILD_DIR=/tmp | |
MERGEPBX_REPO=https://github.com/simonwagner/mergepbx.git | |
build() | |
{ | |
cd $MERGEPBX_BUILD_DIR/$MERGEPBX_TARGET |
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
// Playground - noun: a place where people can play | |
import UIKit | |
class ViewController: UIViewController ,UITableViewDelegate, UITableViewDataSource | |
{ | |
var tableView: UITableView! | |
var items: NSMutableArray! | |
override func viewDidLoad() { | |
super.viewDidLoad() |
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
/** | |
Provides the ability to verify key paths at compile time. | |
If "keyPath" does not exist, a compile-time error will be generated. | |
Example: | |
// Verifies "isFinished" exists on "operation". | |
NSString *key = SQKeyPath(operation, isFinished); | |
// Verifies "isFinished" exists on self. |
NewerOlder