Skip to content

Instantly share code, notes, and snippets.

View istx25's full-sized avatar

Willow istx25

View GitHub Profile
@sohelsd
sohelsd / UIActivity WhatsApp
Last active January 21, 2023 23:13
WhatsApp Swift UIActivityViewController Custom UIActivity
How to add WhatsApp to UIActivityViewController?
Drop the Whatsapp.swift file in your project.
Initialize the controller as described in ViewController.swift
@Goos
Goos / MKPolygon+Containment.h
Last active January 22, 2017 22:25
A category for checking whether or not an MKPolygon contains a point or coordinate.
//
// MKPolygon+Containment.h
// Pods
//
// Created by Robin Goos on 28/04/15.
//
//
#import <MapKit/MapKit.h>
@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
@hirad
hirad / RPNSolver
Last active April 29, 2017 18:03
A Simple RPN Calculator in Swift
struct Stack<T> {
let values: [T]
init(_ v: [T] = [T]()) {
self.values = v
}
func push(elem: T) -> Stack<T> {
let newValues = [elem] + self.values
return Stack<T>(newValues)
//
// SMetadata.swift
// SimpleMusic
//
// Created by Atharva Vaidya on 09/08/15.
// Copyright (c) 2015 Atharva Vaidya. All rights reserved.
//
import Cocoa
import AVFoundation
@albertstartup
albertstartup / cat.js
Created January 2, 2016 05:57
append to a tumblr post from the command line
var Q = require('q');
var tumblr = require('tumblr.js');
var fs = require('fs');
var _ = require('underscore');
// Customize these. Ill give instructions soon. Or ping me for help.
var tumblrClient = tumblr.createClient({
consumer_key: '',
consumer_secret: '',
token: '',
@cmelchior
cmelchior / github_issue_rankings.rb
Last active March 7, 2022 18:58
Small ruby script that will rank all Github issues in a repo according to which is the most popular
#!/usr/bin/ruby -w
#
# This script will analyze a Github repo and try to rank all open issues with regard to popularity.
# WARNING: This script will run quite a few HTTP requests against Github to do this analysis. At least 1 pr. issue.
# The current limit on Github is 5000 requests pr. hour: https://developer.github.com/v3/rate_limit/
#
# Usage: ./ruby github-issue-rankings.rb <github_user/repo> <github_api_access_token>
# Example: ruby github_issue_rankings.rb realm/realm-java $GITHUB_ISSUE_RANKINGS_ACCESS_TOKEN
#
# The algorithm for ranking issues are the following: