git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
import Foundation | |
import XCTest | |
/// Basic sanity check that ensures that we are able to retrieve localized strings for all languages | |
/// we support. | |
final class L10NTests: XCTestCase { | |
func testLocalizations() { | |
let locales = ["en", "es", "zh-Hans", "zh-Hant", "fi"] | |
for locale in locales { |
//: Mocks Playground | |
import UIKit | |
struct User { | |
} | |
struct PushNotificationController { | |
let registrar: PushNotificationRegistrar | |
init(registrar: PushNotificationRegistrar) { |
#Installing ngrok on OSX
Run the following two commands in Terminal to create the symlink.
# cd into your local bin directory
export const schema = { | |
"type": "object", | |
"properties": { | |
"users": { | |
"type": "array", | |
"minItems": 3, | |
"maxItems": 5, | |
"items": { | |
"type": "object", | |
"properties": { |
This is a basic exploration of the Ello API. Completely unofficial, your mileage my vary, don't smash their servers as they are likely very busy.
Methods return HTML for their representation where appropriate which is a nice little pattern. Everything returns application/json.
Like this:
{
"id": ,
var mongoose = require('mongoose'), | |
// Load User model | |
User = mongoose.model('User'), | |
// Create Thing schema | |
thingSchema = new mongoose.Schema({ | |
_user: { | |
type: ObjectId, |
tweetstream: node twitter-pubnub-stream.js |
// This function implements anonymous creation logic. | |
function loadOrCreateAnonymousProfile(req, res, next) { | |
var sess = req.session, | |
auth = sess && sess.auth; | |
if (!auth || !auth.userId) { | |
dbCounter('anonymousUsers', function(err, counter) { | |
if (err) { | |
console.log('Error getting anonymous users counter', err); | |
next(); |
// | |
// CollectionViewDataSource.swift | |
// Khan Academy | |
// | |
// Created by Andy Matuschak on 10/14/14. | |
// Copyright (c) 2014 Khan Academy. All rights reserved. | |
// | |
import UIKit |