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
@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()
@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.

@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
@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
@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
@NigelEarle
NigelEarle / Knex-Setup.md
Last active May 4, 2024 13:36
Setup Knex with Node.js

Knex Setup Guide

Create your project directory

Create and initialize your a directory for your Express application.

$ mkdir node-knex-demo
$ cd node-knex-demo
$ npm init
@bellbind
bellbind / DisplayMode.swift
Last active October 12, 2023 17:54
[macos][swift4]Switch and Display DisplayMode command and StatusBar Menu app
#!/usr/bin/env swift -import-objc-header cg-hidden.h
// $ swiftc -import-objc-header cg-hidden.h DisplayMode.swift
import Foundation
import CoreFoundation
import CoreGraphics
let display = CGMainDisplayID()
let count = UnsafeMutablePointer<Int32>.allocate(capacity: 1)
defer {count.deallocate()}
CGSGetNumberOfDisplayModes(display, count);
-- See the most up to date version here where it says "Download the mrc-converter-suite zip archive" https://discussions.agilebits.com/discussion/30286/mrcs-convert-to-1password-utility/p1
--
-- Exports Safari's saved passwords to a CSV file formatted for use with the convert_to_1p4's csv converter
--
-- Version 1.4
-- mike (at) cappella (dot) us
--
use AppleScript version "2.5" -- runs on 10.11 (El Capitan) and later
use scripting additions
@jxsl13
jxsl13 / vulkan_on_macOS.md
Created April 13, 2019 10:46
Installing Vulkan on macOS / Vulkan SDK and GLFW

Installing Vulkan on macOS

Install brew

https://brew.sh

Install the Vulkan SDK on macOS

$ brew cask install apenngrace/vulkan/vulkan-sdk
@jthomas
jthomas / primes-with-workers.js
Last active April 10, 2022 13:22
Calculating prime numbers on serverless platforms using Node.js Worker Threads and IBM Cloud Functions (Apache OpenWhisk)
'use strict';
const { Worker } = require('worker_threads');
const os = require('os')
const threadCount = os.cpus().length
const compute_primes = async (start, range) => {
return new Promise((resolve, reject) => {
let primes = []
console.log(`adding worker (${start} => ${start + range})`)