Skip to content

Instantly share code, notes, and snippets.

View matthewspear's full-sized avatar
🔨
Always Be Learning

Matt Spear matthewspear

🔨
Always Be Learning
View GitHub Profile
@PurpleBooth
PurpleBooth / README-Template.md
Last active May 17, 2024 09:42
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@natecook1000
natecook1000 / SimplePickerView.swift
Created January 6, 2015 21:48
Simple UIPickerView subclass
class SimplePickerView : UIPickerView {
class SimplePickerViewModel : NSObject, UIPickerViewDelegate, UIPickerViewDataSource {
var titles: [String]
var selectionHandler: ((pickerView: UIPickerView, row: Int, title: String) -> ())?
init(titles: [String], selectionHandler: ((pickerView: UIPickerView, row: Int, title: String) -> ())? = nil) {
self.titles = titles
self.selectionHandler = selectionHandler
}
@ccabanero
ccabanero / Count lines of code in Xcode project
Created August 9, 2014 12:14
Count lines of code in Xcode project
1. Open Terminal
2. cd to your Xcode project
3. Execute the following when inside your target project:
find . -name "*.[hm]" -print0 | xargs -0 wc -l
@klange
klange / _.md
Last active December 2, 2023 20:36
It's a résumé, as a readable and compilable C source file. Since Hacker News got here, this has been updated to be most of my actual résumé. This isn't a serious document, just a concept to annoy people who talk about recruiting and the formats they accept résumés in. It's also relatively representative of my coding style.

Since this is on Hacker News and reddit...

  • No, I don't distribute my résumé like this. A friend of mine made a joke about me being the kind of person who would do this, so I did (the link on that page was added later). My actual résumé is a good bit crazier.
  • I apologize for the use of _t in my types. I spend a lot of time at a level where I can do that; "reserved for system libraries? I am the system libraries".
  • Since people kept complaining, I've fixed the assignments of string literals to non-const char *s.
  • My use of type * name, however, is entirely intentional.
  • If you're using an older compiler, you might have trouble with the anonymous unions and the designated initializers - I think gcc 4.4 requires some extra braces to get them working together. Anything reasonably recent should work fine. Clang and gcc (newer than 4.4, at le