Skip to content

Instantly share code, notes, and snippets.

View FossilizedCarlos's full-sized avatar
🎯
Focusing on SwiftUI and learning R.

Carlos E. Barboza FossilizedCarlos

🎯
Focusing on SwiftUI and learning R.
View GitHub Profile
@FossilizedCarlos
FossilizedCarlos / SpriteKit-SwiftUI-Metaballs.swift
Created June 16, 2025 15:03 — forked from twostraws/SpriteKit-SwiftUI-Metaballs.swift
A 30-minute hack to recreate the "iBeer" effect using SpriteKit, SwiftUI, and metaballs.
//
// A 30-minute hack to recreate the "iBeer" effect using SpriteKit, SwiftUI, and metaballs.
// The effect is created by having hundreds of physics-enabled balls in a SpriteKit scene,
// all drawing nothing. These balls are then read back out by SwiftUI in a TimelineView, and
// drawn using blur and alpha threshold filters to make them appear to be a liquid.
// The SpriteKit scene then has its gravity changed dynamically using the accelerometer,
// meaning that the "liquid" splashes around as you tilt your phone.
//
// Created by Paul Hudson
// https://www.hackingwithswift.com/license
@FossilizedCarlos
FossilizedCarlos / Fibonacci.asm
Created July 29, 2020 23:38
Sample MIPS assembly program to run under MARS from: http://courses.missouristate.edu/KenVollmar/MARS/
# Compute first twelve Fibonacci numbers and put in array, then print
.data
fibs: .word 0 : 12 # "array" of 12 words to contain fib values
size: .word 12 # size of "array"
.text
la $t0, fibs # load address of array
la $t5, size # load address of size variable
lw $t5, 0($t5) # load array size
li $t2, 1 # 1 is first and second Fib. number
add.d $f0, $f2, $f4

How to use a PS3 controller on Mac OS X 10.7 (Lion)

  1. Open Apple menu -> System Preferences -> Bluetooth and disable Bluetooth on Mac as well as any other nearby Macs or devices which will try to pair with and confuse the controller.

  2. Reset PS3 controller by inserting paperclip into pinhole near L2 button.

  3. Connect PS3 controller to Mac with USB cable.

  4. Enable Bluetooth.