Skip to content

Instantly share code, notes, and snippets.

Kyle Clegg kyleclegg

Block or report user

Report or block kyleclegg

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@deargle
deargle / _island.byu.edu-conf.md
Last active Feb 1, 2019
island.byu.edu configs and scripts
View _island.byu.edu-conf.md

how to start from scratch

  • set up the nginx-proxy docker-compose. pull down nginx.tmpl.

    • This will give auto letsencrypt
  • git clone discourse into /home/deargle/island, drop in the two container config files below. Build them using the discourse launcher

  • git clone the discourse-cas repo, up that.

  • configure exim on the host to sign messages with dkim (see script below)

  • follow the steps for restoring island from backup:

      # download bkacups from aws and put it into `shared/standalone/backups/default/`. Then: 
    
@jpotts18
jpotts18 / Alamofire-JSON-Serialization.md
Last active Mar 29, 2019
Alamofire JSON Serialization of Objects, Collections, Nesting
View Alamofire-JSON-Serialization.md

Alamofire JSON Serialization of Objects and Collections

Alamofire is a great Swift library developed by the creator of AFNetworking @mattt. The purpose of this gist is to explain how to use the built-in power of Alamofire to serialize your JSON. In this example we will be serializing a simple blog API. First we will start with serializing a single JSON object and add complexity as we go along.

Warning: This was written before Swift 1.2

A Single JSON Serialization

This is the first JSON object that we will be serializing.

@szehnder
szehnder / DataProvider.swift
Last active Dec 23, 2019
Pattern for async callback between a view controller and a dataprovider singleton
View DataProvider.swift
typealias ServiceResponse = (NSDictionary?, NSError?) -> Void
class DataProvider: NSObject {
var client:AFHTTPRequestOperationManager?
let LOGIN_URL = "/api/v1/login"
class var sharedInstance:DataProvider {
struct Singleton {
static let instance = DataProvider()
You can’t perform that action at this time.