Skip to content

Instantly share code, notes, and snippets.

View philosopherdog's full-sized avatar

Steve Thompson philosopherdog

View GitHub Profile
//
// ContentMapper.swift
//
//
// Created by Antoine van der Lee on 09/03/2021.
//
import Foundation
import ContentKit
@philosopherdog
philosopherdog / a_qwerty.txt
Last active March 27, 2021 20:13
Kinesis Advantage 2 Mappings
[caps]>[escape][t&h250][lwin]
[=]>[=][t&h250][hyper]
[\]>[\][t&h250][meh]
[scroll]>[shutdn]
[kp=]>[kp=mac]
[kp-lctrl]>[kp-lwin]
[rctrl]>[rwin]
[kp-rctrl]>[kp-rwin]
[kp-rwin]>[kp-rctrl]
[delete]>[lwin]
@philosopherdog
philosopherdog / CustomStringConvertible.swift
Last active December 8, 2021 14:51 — forked from khramtsoff/CustomStringConvertible.swift
CustomStringConvertible prints memory address
import Foundation
extension CustomStringConvertible {
var description: String {
var description: String = "\(type(of: self))("
let selfMirror = Mirror(reflecting: self)
for child in selfMirror.children {
if let propertyName = child.label {
# OS X Finder
.DS_Store
# Xcode per-user config
*.mode1
*.mode1v3
*.mode2v3
*.perspective
*.perspectivev3
*.pbxuser

Videos

@philosopherdog
philosopherdog / hosting-on-github.md
Created May 25, 2019 18:50 — forked from TylerFisher/hosting-on-github.md
Basic steps for hosting on Github

Steps for Hosting a Website on GitHub

  1. Create a GitHub account on github.com.
  2. Download either [GitHub for Mac][1] or [GitHub for Windows][2], depending on your operating system. Open the app and log in using the account you just created.
  3. (On Mac): After you login, click advanced and make sure that your name and email are correct. Then, click "Install Command Line Tools", just in case you want to start using the command line later in life.
  4. Create a new repository in your GitHub application. Name it your-username.github.io. The name is very important. Note the folder that GitHub is saving the repository to. Make sure the "Push to GitHub?" box is checked.
  5. Move your website's files into the folder that GitHub just created when you made the repository. IMPORTANT: Your homepage HTML file must be called "index.html", and it must exist in the top-level directory.
  6. Back in the GitHub application, you should see your files in the left column. Make sure they are all checked. If so, enter a mess
@philosopherdog
philosopherdog / W6D2-Keyframe-Animation.swift
Created September 7, 2018 00:09
W6D2-Keyframe-Animation
import PlaygroundSupport
import UIKit
class MyVC: UIViewController {
let button = UIButton()
override func viewDidLoad() {
super.viewDidLoad()
view.backgroundColor = .red
view.addSubview(button)
button.setTitle("button", for: .normal)
@philosopherdog
philosopherdog / CURL-cheatsheet.md
Created January 25, 2018 18:57 — forked from Kartones/CURL-cheatsheet.md
CURL Cheatsheet
  • XML GET
curl -H "Accept: application/xml" -H "Content-Type: application/xml" -X GET "http://hostname/resource"
  • JSON GET
curl -i -H "Accept: application/json" -H "Content-Type: application/json" -X GET "http://hostname/resource"
  • JSON PUT
@philosopherdog
philosopherdog / Snapshot+UIImage.swift
Created October 10, 2017 19:35
Take a snapshot of a nib file
extension UIImage {
static func snapshot(view: UIView) -> UIImage? {
UIGraphicsBeginImageContextWithOptions(view.bounds.size, true, 0)
view.drawHierarchy(in: view.bounds, afterScreenUpdates: true)
let image = UIGraphicsGetImageFromCurrentImageContext()
UIGraphicsEndImageContext()
return image
}
}
@philosopherdog
philosopherdog / parse_instructions.md
Last active June 7, 2017 21:25
Parse installation instructions

Instructions For Installing Parse To Heroku

Setting Your App Up On Heroku

  • Create a Heroku account. You will need a credit card even though this is a free tier account.

  • Once you have created an account and can log in then go to this link: here

  • Scroll down until you see a purpose button that says "Deploy To Heroku". CLICK that button!