Skip to content

Instantly share code, notes, and snippets.

View isaac-weisberg's full-sized avatar
💭
🤔🤔🤔

Isaac Weisberg isaac-weisberg

💭
🤔🤔🤔
View GitHub Profile
language: generic
matrix:
include:
# Test Ubuntu Linux 14.04 / Swift 3.0.2
- os: linux
dist: trusty
sudo: required
# Test Xcode 8.3 / Swift 3.1.1
- os: osx
osx_image: xcode8.3
@isaac-weisberg
isaac-weisberg / Makefile
Created March 18, 2018 08:29
Swift Package Manager targets for GNU Make
BUILD_DIR=./.build
default: build
build:
swift build
test:
swift test
@isaac-weisberg
isaac-weisberg / Environment.swift
Created March 24, 2018 16:45
Global environment class
class ArbitraryConfigurationData {
// content units references
}
extension Environment {
class func bootstrap(with configuration: ArbitraryConfigurationData) {
Environment.shared = Environment(with: configuration)
}
}
@isaac-weisberg
isaac-weisberg / Environment.swift
Created March 24, 2018 17:07
Global shared environment but with a twist
class ArbitraryConfigurationData {
// content units references
}
extension Environment {
class func bootstrap(with configuration: ArbitraryConfigurationData) {
Environment.shared = Environment(with: configuration)
}
}
@isaac-weisberg
isaac-weisberg / ChainController.swift
Created April 23, 2018 06:35
An override of UITabBarController. Alternative to usage of UINavigationController. Allows to bundle several UIViewController's into a single controller to simplify bundling and life-cycle management
//
// ControllerChain.swift
// Pobjects
//
// Created by Endoral Work on 4/11/18.
// Copyright © 2018 endoralwork-idsi. All rights reserved.
//
import UIKit
@isaac-weisberg
isaac-weisberg / XibModularView.swift
Created June 8, 2018 02:44
Xib Modular View. Extend this class to load contents of your custom views from .nibs.
//
// XibModularView.swift
// Pobjects
//
// Created by Isaac Weisberg on 4/5/18.
// Copyright © 2018 Isaac Weisberg. All rights reserved.
//
import UIKit
@isaac-weisberg
isaac-weisberg / XibModularView.swift
Created June 9, 2018 09:14
Load your views from Xibs with this
//
// XibModularView.swift
// Pobjects
//
// Created by Isaac Weisberg on 4/5/18.
// Copyright © 2018 Isaac Weisberg. All rights reserved.
//
import UIKit
@isaac-weisberg
isaac-weisberg / ArrowVsNamedFunctions.ts
Created September 5, 2018 07:50
This a typescript file that explains the difference between an arrow function and a named function in Javascript runtime
const l = console.log
class Asdf {
memberProp = 3450
methodA = () => {
const a = this.memberProp
return a
}
@isaac-weisberg
isaac-weisberg / Makefile
Last active October 17, 2018 16:23
Most orthodox starter Makefile for C-based projects
CC=clang
LD=ld
LDFLAGS=-lc
CCFLAGS=
EXEC=bin/a.out
OBJECTS=src/main.o \
default: run
func foo() -> Any {
class Bar {
let baz: Int
init(_ value: Int) {
baz = value
}
}
let bar = Bar(3)