Skip to content

Instantly share code, notes, and snippets.

Jon Beebe jonathan-beebe

Block or report user

Report or block jonathan-beebe

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jonathan-beebe
jonathan-beebe / custom_json_parsing.swift
Last active Jun 19, 2019
Customize json parsing of a Swift Decodable
View custom_json_parsing.swift
// https://gist.github.com/jonathan-beebe/a631492c6589b14d0c06fe846d266ff7
import UIKit
// The vendor sandbox returns the following values for an `undefined` string value:
//
// - `""`
// - `"None"`
// - `null`
//
View reflection_example.cs
using System;
using System.Reflection;
using System.Collections.Generic;
using System.Linq;
interface IRessetable
{
void Reset();
}
View eisenhower_matrix.md
                       Urgent               Not Urgent
               ┌─────────────────────┬─────────────────────┐
               │                     │                     │
               │                     │                     │
     Important │      Do First       │      Do Later       │
               │                     │                     │
               │                     │                     │
               ├─────────────────────┼─────────────────────┤
               │                     │                     │
View gist:34e5c0815c17c063f3c211f288fe871d
┌──────────────────────────┬──────────────────────────┐
Complex │┌───────────┐ │ ┌───────────┐│
││ Engineer │ │ │ Architect ││
▲ │└───────────┘ │ └───────────┘│
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
View git_snippets.md

Cleanup

Run this command periodically to clean loose objects and compress stuff.

git gc --aggressive

General

List all local branches sorted by last commit date, oldest last

@jonathan-beebe
jonathan-beebe / negotiating used car from dealer.md
Last active Sep 19, 2019
Negotiating a cash purchase of used car from a dealer
View negotiating used car from dealer.md

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.
View fix_jira.css
/* make the filters a bit more compact */
.ghx-controls-filters dt {
margin: 0;
}
.ghx-controls-filters dd {
margin: 0;
font-size: 12px;
}
View ios_memory_leaks.md

Blocks that are added to a notification center

typeof(self) __weak weakSelf = self;
[[[EDFlux sharedInstance] budgetStore] addChangeObserverWithBlock:^(NSNotification* note) {
    [weakSelf doSomething];
}];
@jonathan-beebe
jonathan-beebe / swift-to-objc-bool-bridge.m
Created Dec 22, 2016
Bridging an optional bool from Swift to Objective-C
View swift-to-objc-bool-bridge.m
@implementation MyObjcClass
. . .
if(mySwiftClassInstance.hasFeatureBridged == nil) {
// handle nil case
}
else if(mySwiftClassInstance.hasFeatureBridged boolValue] == YES) {
// handle true case
}
@jonathan-beebe
jonathan-beebe / Garmin Connect IQ Custom Drawable
Last active Oct 3, 2016
Garmin Connect IQ Custom Drawable
View Garmin Connect IQ Custom Drawable
A sample of creating a custom drawable, both in xml and via code.
You can’t perform that action at this time.