Skip to content

Instantly share code, notes, and snippets.

View alexandre-g's full-sized avatar

Alexandre alexandre-g

View GitHub Profile
@alexandre-g
alexandre-g / Package.swift
Created October 6, 2022 02:16
Dependency package for Scipio
// swift-tools-version: 5.7
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let package = Package(
name: "Dependencies",
platforms: [
.iOS(.v13),
],
@alexandre-g
alexandre-g / PassData.swift
Created December 14, 2017 08:43
Injecting data to view controller Swift 4
// Inspired by https://github.com/icanzilb/EventBlankApp
extension UIStoryboard {
func instantiateViewController<T: UIViewController>(_ type: T.Type) -> T {
return instantiateViewController(withIdentifier: type.classIdentifier) as! T
}
}
extension UIViewController {
static var classIdentifier: String { return String(describing: self) }
@alexandre-g
alexandre-g / 0_reuse_code.js
Last active August 29, 2015 14:17
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console