Skip to content

Instantly share code, notes, and snippets.

View DanBurkhardt's full-sized avatar
👓
building Kassandra, a macOS AR app for Nreal Air.

Dan Burkhardt DanBurkhardt

👓
building Kassandra, a macOS AR app for Nreal Air.
View GitHub Profile
@stonetip
stonetip / courseAngles.swift
Last active April 20, 2023 20:44
functions to use and smooth course from CLLocationManager and get north angle relative to current angle
var courseAvgX: Double = 0
var courseAvgY: Double = 0
func getVectorAvg(latestReading: Double) -> Double {
let deg2Rad = 180 / Double.pi
// convert reading to radians
var theta = latestReading / deg2Rad
// running average
@andriiburka
andriiburka / SecurityCameraPS3
Created September 8, 2017 14:40
MotionEye Security Camera for Apple HomeKit RPI3 USB
clear
echo "Starting Motioneye Installation"
sleep 1
clear
cd /home/pi
sudo wget https://github.com/ccrisan/motioneye/wiki/precompiled/ffmpeg_3.1.1-1_armhf.deb
sudo dpkg -i ffmpeg_3.1.1-1_armhf.deb
sudo rm -rf ffmpeg_3.1.1-1_armhf.deb
sudo apt-get remove libavcodec-extra-56 libavformat56 libavresample2 libavutil54
sudo apt-get install libavutil54 libavformat56 libswscale3 -y
@ulope
ulope / README.md
Last active July 10, 2021 05:21
iOS fullscreen camera preview without UI

iOS Fullscreen UI-less camera preview

I recently had a need for an app that displayed a fullscreen camera preview on an iPhone without any UI whatsoever. This is the result of 30 minutes of cobbling together various SO answers, blog posts etc.

All you need to do to use this is:

  • Create a new "Single view" poject
  • Add a new UIView to the ViewController in the Storyboard
  • Connect the outlet previewView to the UIView
@rmondello
rmondello / gist:b933231b1fcc83a7db0b
Last active April 5, 2024 07:10
Exporting (iCloud) Keychain and Safari credentials to a CSV file

Exporting (iCloud) Keychain and Safari credentials to a CSV file

Update (October 2021)

Exporting password + one-time code data from iCloud Keychain is now officially supported in macOS Monterey and Safari 15 (for Monterey, Big Sur, and Catalina). You can access it in the Password Manager’s “gear” icon (System Preferences > Passwords on Monterey, and Safari > Passwords everywhere else), or via the File > Export > Passwords... menu item). You shouldn't need to hack up your own exporter anymore.

Original, Obsolete Content (2014)

After my dad died, I wanted to be able to have access any of his online accounts going forward. My dad was a Safari user and used iCloud Keychain to sync his credentials across his devices. I don’t want to have to keep an OS X user account around just to access his accounts, so I wanted to export his credentials to a portable file.

@Starefossen
Starefossen / remoteDataTableView.swift
Last active January 16, 2023 09:50
Remote JSON Data to tableView in iOS 8.0 (Swift)
import UIKit
import Foundation
import XCPlayground
XCPSetExecutionShouldContinueIndefinitely()
class RemoteAPI {
func getData(completionHandler: ((NSArray!, NSError!) -> Void)!) -> Void {
let url: NSURL = NSURL(string: "http://itunes.apple.com/search?term=Turistforeningen&media=software")
let ses = NSURLSession.sharedSession()