Skip to content

Instantly share code, notes, and snippets.

View jparishy's full-sized avatar

Julius Parishy jparishy

View GitHub Profile
//
// ViewController.m
// Path
//
// Created by Julius Parishy on 7/28/18.
// Copyright © 2018 JP. All rights reserved.
//
#import "ViewController.h"
const transformDAUResponse = (response) => {
return response.dau;
};
const transformDateForDAUURL = (date) => {
return `/get/daus/?date=${data}`;
}
const reduceDAUs = (DAUs) => {
if (DAUs.length == 0) {
@jparishy
jparishy / doc.md
Last active May 1, 2024 21:35
Snapchat Example API Doc

Snapchat API

Base URL

https://snapchat-example-api.herokuapp.com/api/v1/

Notes

  • All endpoints accept JSON payloads for parameters
    • Must include "Content-Type" HTTP header with value "application/json"
    • All endpoints accept /users/authenticate require the X-Api-Token HTTP header
//
// _JSONWriting.swift
// Swerver
//
// Created by Julius Parishy on 12/13/15.
// Copyright © 2015 Julius Parishy. All rights reserved.
//
import Foundation
@jparishy
jparishy / run-tests.sh
Last active December 26, 2015 05:18
Ruby script for running tests in subfolders of the /Tests directory in a Swift Package Manager based project
#!/usr/bin/env ruby
# Config
TEST_DIR = "Tests"
DEBUG = true
PRIMARY_TARGET_NAME = "Swerver"
SKIP_DIRS = [ ]
VERBOSE = ARGV[0] == "-v"
//
// SessionsController.swift
// Swerver
//
// Created by Julius Parishy on 12/17/15.
// Copyright © 2015 Julius Parishy. All rights reserved.
//
import Foundation
class UserIndexView : View {
convenience init() {
self.init {
t in
BootstrapLayout.render(t, activeTab: .Home) { t in
t.div(cssClass: "jumbotron") { t in
t.h1("Swerver")
t.h4("An MVC Framework for Web Apps & APIs in Swift")
t.tag("hr")
//
// Layout.swift
// Swerver
//
// Created by Julius Parishy on 12/21/15.
// Copyright © 2015 Julius Parishy. All rights reserved.
//
import Foundation
//
// TodosController.swift
// Swerver
//
// Created by Julius Parishy on 12/11/15.
// Copyright © 2015 Julius Parishy. All rights reserved.
//
import Foundation
//
// JSON.swift
// Swerver
//
// Created by Julius Parishy on 12/12/15.
// Copyright © 2015 Julius Parishy. All rights reserved.
//
import Foundation