Skip to content

Instantly share code, notes, and snippets.

@jonathan-beebe
jonathan-beebe / negotiating used car from dealer.md
Last active January 8, 2021 06:10
Negotiating a cash purchase of used car from a dealer

Negotiating a used car purchase from a dealer

(assuming you are paying cash)

Preparation

  • Arm yourself with information.
    • Kelly blue book value. Helps inform what a reasonable price will be.
    • Black book value. Helps define the dealer’s bottom price, what they would acquire the car for in a trade-in.
  • Common car problems and their cost.
@clarkbw
clarkbw / ios-debugger.md
Last active September 19, 2016 20:54
Instructions for the debugger.html to debug Safari running in the iOS simulator

Safari

These are the instructions for getting the debugger.html project to connect to and debug Safari on various platforms.

iOS Simulator (Mac only)

Requirements

  • Xcode
  • Download and install Xcode from Apple
@chriseidhof
chriseidhof / Shoes.swift
Last active April 21, 2022 17:02
shoes in swift
import Cocoa
class MyAppDelegate: NSObject, NSApplicationDelegate {
let window = NSWindow()
var didFinishLaunching: NSWindow -> () = { _ in () }
func applicationDidFinishLaunching(aNotification: NSNotification) {
didFinishLaunching(window)
}
}
@jonathan-beebe
jonathan-beebe / fix_alcatraz_plugins.sh
Last active December 9, 2015 18:36
Fixing Alcatraz after upgrading Xcode
# Upgrading Xcode can wreak havok on your custom Alcatraz setup.
# Each plugin must list the UUIDs of Xcode that it supports. Thus
# with each new release we must update the list of UUIDs for each
# plugin we want to continue using.
#
# You can discover the UUID of an Xcode app bundle by running this command
defaults read /Applications/Xcode.app/Contents/Info DVTPlugInCompatibilityUUID
# > 7FDF5C7A-131F-4ABB-9EDC-8C5F8F0B8A90
@mackuba
mackuba / wwdc15.md
Last active August 6, 2022 17:28
New stuff from WWDC 2015

Here's my own list of the interesting stuff announced during this year's WWDC, collected from the keynotes, various Apple docs, blog posts and tweets.

If you're planning to watch the videos, I really recommend this Mac app that helps you download and watch them: https://github.com/insidegui/WWDC.

OS X El Capitan

http://www.apple.com/osx/elcapitan-preview/

  • split view - two apps side by side on full screen
@praeclarum
praeclarum / ArrayDiff.swift
Last active January 8, 2021 06:10
A generic diffing operation that can calculate the minimal steps needed to convert one array to another. It can be used to generate standard diffs, or it can be used more creatively to calculate minimal UI updates.
//
// ArrayDiff.swift
//
// Created by Frank A. Krueger on 6/30/15.
// Copyright © 2015 Krueger Systems, Inc. All rights reserved.
// License: MIT http://opensource.org/licenses/MIT
//
import Foundation
@IainIsCreative
IainIsCreative / type-setting.scss
Last active February 8, 2023 17:07
A simple mixin for easy writing of font sizes and line heights, in rems. Also includes an option for writing type in ems.
/**
*
* SCSS Type Setting Mixin
*
* For easier writing of font sizes and line-heights, relatively.
* This can be used for writing base styles, but also specific ones if necessary.
*
**/
// Root Font Size Variable — best to avoid changing unless you like risks.
@smileyborg
smileyborg / Xcode7Macros.h
Last active May 26, 2020 12:08
Backwards compatible macros for Objective-C nullability annotations and generics
/**
* The following preprocessor macros can be used to adopt the new nullability annotations and generics
* features available in Xcode 7, while maintaining backwards compatibility with earlier versions of
* Xcode that do not support these features.
*/
#if __has_feature(nullability)
# define __ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
# define __ASSUME_NONNULL_END NS_ASSUME_NONNULL_END
# define __NULLABLE nullable
@interface NSObject (Debounce)
- (void)debounce:(SEL)action delay:(NSTimeInterval)delay;
@end
@axemclion
axemclion / Readme.md
Last active August 29, 2015 14:03
GPU Composited CSS - Performance

Ariya Hidayat has written an excellent article on GPU Composited CSS and how it can be used to optimize web rendering performance.

The impact of adding CSS transforms is evident in developer timline and this experiment is a way to capture that information using browser-perf. The results from this experiment clearly indicate how certain CSS properties move rendering load to the GPU, and how that that impact the overall responsiveness of the page.

Pre-requisites

  1. Ensure that you have node and npm installed
  2. Ensure that you have Selenium running, or can connect to Sauce Labs
  3. Dowload this gist using git clone https://gist.github.com/853d34ebd776047836f3.git
  4. Install other dependencies using npm install