Skip to content

Instantly share code, notes, and snippets.

View jordanekay's full-sized avatar
🟢
Currently available for new projects

Jordan Kay jordanekay

🟢
Currently available for new projects
View GitHub Profile
enum COVID {}
extension COVID {
struct Conditions {
let caseCount: Int
let hospitalizationCount: Int
let caseIncrease: Float
}
public struct Response {
@brennanMKE
brennanMKE / Playground.swift
Last active June 20, 2022 09:45
Traits in Swift with Property Wrappers
import Foundation
enum Trait {
case search
case name
case number
case email
case phone
case password
case sensitive
@RuiAAPeres
RuiAAPeres / SwiftUIBindsWithReactiveSwift.swift
Last active August 5, 2024 07:54
Couple of methods to bridge ReactiveSwift with SwiftUI
import Combine
import ReactiveSwift
import SwiftUI
class AnySubscription: Subscription {
private let cancelable: Cancellable
init(cancelable: Cancellable) {
self.cancelable = cancelable
@samgrover
samgrover / swarm-day-one-import.py
Created April 16, 2019 17:51
Parse the Swarm/Foursquare exported data and create entries in Day One using their command line tool.
#!/usr/bin/env python
# Parse the Swarm/Foursquare exported data and create entries in Day One using their command line tool.
# Day One command line tool available at: http://dayoneapp.com/support/CLI
import sys
import json
import requests
import subprocess
import time
@ericmustin
ericmustin / halloweenIndex.json
Created January 31, 2018 23:08
test_index_for_hw_outfits
{"costumes":[
{
"name":"the strawberry",
"slug":"the-strawberry",
"categories":[
{
"name": "baby",
"slug": "baby"
},
{
@krzysztofzablocki
krzysztofzablocki / FindFinalClasses.swift
Last active August 22, 2021 12:12
Swift makes classes final if possible
#!/usr/bin/env bash
<% for type in types.classes { -%>
<%_ if type.attributes["final"] != nil || type.attributes["open"] != nil || types.based[type.name]?.isEmpty == false { continue } -%>
<%_ _%>git grep -lz 'class <%= type.name %>' | xargs -0 perl -i'' -pE "s/class <%= type.name %>(?=\s|:)/final class <%= type.name %>/g"
<% } %>
@rbobbins
rbobbins / protocols.md
Last active June 11, 2024 22:11
Notes from "Protocol-Oriented Programming in Swift"

PS: If you liked this talk or like this concept, let's chat about iOS development at Stitch Fix! #shamelessplug

Protocol-Oriented Programming in Swift

Speaker: David Abrahams. (Tech lead for Swift standard library)

  • "Crusty" is an old-school programmer who doesn't trust IDE's, debuggers, programming fads. He's cynical, grumpy.

  • OOP has been around since the 1970's. It's not actually new.

  • Classes are Awesome

    • Encapsulation
    • Access control
@jordanekay
jordanekay / gist:8855193
Created February 7, 2014 00:15
Debug -[UIScrollView setContentOffset:animated:] by changing duration
NSTimeInterval duration = 3.0;
SEL selector = @selector(_setContentOffsetAnimationDuration:);
NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:[scrollView methodSignatureForSelector:selector]];
[invocation setSelector:selector];
[invocation setTarget:scrollView];
[invocation setArgument:&duration atIndex:2];
[invocation invoke];
[scrollView setContentOffset:contentOffset animated:YES]
@juliepagano
juliepagano / 101_off_limits.md
Last active December 16, 2020 09:37
101 conversations I generally don't want to have...

This list now exists over at http://juliepagano.com/blog/2013/11/02/101-off-limits/ and will be updated there.

I keep saying that impromptu, unwanted feminism 101 discussions are exhausting and not a good use of my resources. Then people ask what I mean by 101, so I'm starting to make a list. This list will change over time - I recommend checking back.

I highly recommend checking this list before engaging with me about feminism if you're new to it. It'll save both of us a lot of time and frustration.

Diversity in tech

Women aren't equally represented in tech because biology

Nope. This argument is bad and the science does not support it. Unfortunately, every time you say this out loud, you are contributing to cultural problems that do decrease the number of women in tech.