Skip to content

Instantly share code, notes, and snippets.

View ThoseGrapefruits's full-sized avatar
🕴️

Logan Moore ThoseGrapefruits

🕴️
View GitHub Profile
@ThoseGrapefruits
ThoseGrapefruits / PIDController.swift
Last active July 12, 2021 17:43
Swift PID controller for SpriteKit
import Foundation
import SpriteKit
class PIDController {
var kProportion: Double;
var kIntegral: Double;
var kDerivative: Double;
var cProportion: Double = 0;
var cIntegral: Double = 0;
@ThoseGrapefruits
ThoseGrapefruits / SKNodeGetPosition.swift
Last active September 17, 2023 14:09
SceneKit get ancestor-relative (and scene-relative) position and rotation
import Foundation
import SpriteKit
extension SKNode {
func getPosition(within ancestor: SKNode) -> CGPoint {
let (position, _) = getPositionAndRotation(within: ancestor)
return position
}
Verifying that "thosegrapefruits.id" is my Blockstack ID. https://explorer.blockstack.org/name/thosegrapefruits.id
Verifying my Blockstack ID is secured with the address 18LsnMzEo7GE3CBVSNviqi8xRvytfkyAc7 https://explorer.blockstack.org/address/18LsnMzEo7GE3CBVSNviqi8xRvytfkyAc7
@ThoseGrapefruits
ThoseGrapefruits / lm-magic.zsh-theme
Last active May 31, 2018 13:00
lm-magic theme for oh-my-zsh
# lm-magic.zsh-theme
# based on af-magic.zsh-theme
# Repo: https://gist.github.com/ThoseGrapefruits/01345c824dc5e7c5399cc3ab853f48a9
# Direct Link: https://gist.githubusercontent.com/ThoseGrapefruits/01345c824dc5e7c5399cc3ab853f48a9/raw/lm-magic.zsh-theme
if [ $UID -eq 0 ]; then NCOLOR="red"; else NCOLOR="green"; fi
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
# primary prompt
PROMPT='$FG[237]-------- ------- ----- ---- --- -- -%{$reset_color%}
@ThoseGrapefruits
ThoseGrapefruits / keybase.md
Created July 15, 2014 01:13
Keybase Proof

Keybase proof

I hereby claim:

  • I am ThoseGrapefruits on github.
  • I am thosegrapefruits (https://keybase.io/thosegrapefruits) on keybase.
  • I have a public key whose fingerprint is 36B7 EBEA CCEC 1EED 868B 53AB A68E D758 EB33 4533

To claim this, I am signing this object: