Skip to content

Instantly share code, notes, and snippets.

@stevesparks
stevesparks / notarize.sh
Last active May 13, 2020 16:01
Apple Mac notarization script
#!/bin/sh
##
## CHANGE THESE FOR YOUR NEEDS
##
APPLE_USER=your@username.here
APPLE_PASS=apple-app-specific-password
APPNAME="$1"
ZIPNAME="$APPNAME.zip"
class GameScene: SKScene {
var board = [[CellNode]]()
let boardSizeX = 46
let boardSizeY = 25
override func didMove(to view: SKView) {
for x in 0...boardSizeX {
var nodes = [CellNode]()
//
// OutlineViewDiffableDataSource.swift
// OutlineDiffer
//
// Created by Steve Sparks on 2/7/20.
//
import Cocoa
class OutlineViewDiffableDataSource: NSObject {
@stevesparks
stevesparks / LTPH
Last active August 12, 2019 09:23
Lyrics
You watch TV and all you see
is pain and misery
You look for hope and find despair
Like poison on the air
Can't look away
It gets so hard to imagine better days
But it seems to me...
That a little bit of love, a little bit of tenderness
Can bring peace, peace, peace and happiness.
@stevesparks
stevesparks / OrbitalTests.swift
Last active September 30, 2018 14:57
A bit of Swift code to help parse through electron orbitals.
//
// OrbitalTests.swift
// ModelTests
//
// Created by Steve Sparks on 9/29/18.
// Copyright © 2018 SOG. All rights reserved.
//
import XCTest
@testable import Spherey
Restoration class map is {
}
Top Level
---------
interfaceVersion..................................20
kFirstRespondersKey...............................(
"RootViewController/:[0]:/PrimaryStackViewController/:[1]:/FRNavigationController-A7EF5A50-F72A-4323-868F-3D149819B8C7/:[0]:/ArticlePageViewController/:[0]:/ArticleViewController/:[0]:/FlintArticleContentViewController"
#!/bin/sh
if [ ! -f "$1" ]; then
echo "Usage: $0 <input-file>"
exit 1
fi
BASE=`echo $1 | cut -d . -f 1`;
TAIL=`echo $1 | cut -d . -f 2-`;
#!/bin/sh
#
# Export Icons
#
# If you have a square image "bob.png" and you need to rapidly generate the right
# icon sizes, and you have ImageMagick installed, this script will do it for you.
# The quality suffers at lower sizes, so this is not some sort of production icon
# maker. I use it to icon my quick test apps.
#
# No guarantees, warranties, etc.
@stevesparks
stevesparks / RotationResistantView.h
Last active August 29, 2015 14:14
Autolayout Gists
//
// RotationResistantView.h
//
// Created by Steve Sparks on 1/24/15.
//
#import <UIKit/UIKit.h>
typedef NS_ENUM(NSInteger, RRLayoutAttribute) {
@stevesparks
stevesparks / Globals
Last active December 27, 2015 18:39
Globals by Borde
Original song: http://www.youtube.com/watch?v=nlcIKh6sBtc
Instrumental: http://www.youtube.com/watch?v=NPq-HIyTfVE
but I love this version: http://www.youtube.com/watch?v=VBmCJEehYtU
i've never seen a constant in the flesh
Cut my teeth on mem-mapped files, through a proxy
and i'm not proud of my address