Skip to content

Instantly share code, notes, and snippets.

View theevo's full-sized avatar

Theo Vora theevo

  • NYC
View GitHub Profile
@christianselig
christianselig / apollo-update-june-19-2023.md
Last active October 2, 2023 22:00
I want to debunk Reddit's claims, and talk about their unwillingness to work with developers, moderators, and the larger community, as well as say thank you for all the support

I wanted to address Reddit's continued, provably false statements, as well as answer some questions from the community, and also just say thanks.

(Before beginning, to the uninitiated, "the Reddit API" is just how apps and tools talk with Reddit to get posts in a subreddit, comments on a post, upvote, reply, etc.)

Reddit: "Developers don't want to pay"

Steve Huffman on June 15th: "These people who are mad, they’re mad because they used to get something for free, and now it’s going to be not free. And that free comes at the expense of our other users and our business. That’s what this is about. It can’t be free."

This is the false argument Steve Huffman keeps repeating the most. Developers are very happy to pay. Why? Reddit has many APIs (like voting in polls, Reddit Chat, view counts, etc.) that they haven't made available to developers, and a more formal relationship with Reddit has the opportunity to create a better API experience with more features available. I expressed this willingness to pay m

@ryansobol
ryansobol / Array+Permutations.swift
Last active August 12, 2021 15:38
Generate the permutations of a Swift array
extension Array {
func chopped() -> (Element, [Element])? {
guard let x = self.first else { return nil }
return (x, Array(self.suffix(from: 1)))
}
}
print([1, 2, 3].chopped())
// Optional((1, [2, 3]))
import UIKit
struct Chat {
var users: [String]
var dictionary: [String: Any] {
return ["users": users]
}
}
extension Chat {
@jagdeepsingh
jagdeepsingh / README.md
Last active December 9, 2021 10:26
Set up macOS Catalina 10.15 with development tools | Git | Homebrew | rbenv | bundler | Atom | Databases | Node.js | Yarn | kubectl | Elastic Stack
@MainasuK
MainasuK / AppDelegate.swift
Created September 5, 2019 08:05
AppDelegate for iOS 13 with multiple windows supports
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Set up application here
//I have a location manager class. This class just holds user current location so that it can be used later in the project.
//This will be singleton class later.Since singletons are hard to test(Because of no DI injection mechanism).I have not
implemented yet for now.The problem is at the end.
class HelperLocationManager:NSObject{
let locationManager:CLLocationManager
init(mgr:CLLocationManager) {
@joemasilotti
joemasilotti / About.md
Last active March 26, 2020 09:35
Building NSURL Queries with NSURLQueryItems and NSURLComponents
@polycarpou
polycarpou / person.rb
Created October 10, 2013 14:45
Day 14: TODO: Mass-assignment of properties at initialization
class Person
def initialize(attributes)
attributes.each do |key,value|
Person.send(:define_method, key){value}
end
end
end
def normalize_phone_number(number)
clean_num = number.gsub(/[^0-9]/, "")
clean_num.length != 10 ? number : "(#{clean_num[0,3]}) #{clean_num[3,3]}-#{clean_num[6,4]}"
end
@vcavallo
vcavallo / fork_you.markdown
Last active December 24, 2015 00:09
Forking how-to with descriptions

Forking

essentially like cloning on github's servers - but that's inconsequential, mostly.. also: forks are not automatically up to date (relative to repo you forked)! your fork creates a snapshot of the original repo at the time you fork it.

  • fork on github

  • creates a clone on github servers

  • copy url of that clone

  • git clone [url]

    • clones the content of your fork to your local machine