Skip to content

Instantly share code, notes, and snippets.

@crcdng
crcdng / leap_macos.md
Last active March 31, 2024 15:33
Set up Leap Motion for Python development on macOS 11 Big Sur

NOTE this tutorial was written Dec 2020 and I don't use Leap on Mac since then. Use at your own risk. It still seems to work for some people, but I cannot support it further or answer questions unless I get a project with Leap / Mac again.

The Leap Motion Controller (https://www.ultraleap.com/product/leap-motion-controller/) has been a favourite input device for user interface designers and hackers alike. It allows to create touchless user interfaces that track hand movement and recognize gestures (not bad in the current situation).

Unfortunately the company who made it has decided to go big and bold on VR and Windows only and stopped supporting development on a Mac. There are still options available, for example getting the Leap Motion data via node.js. Yet Python can be the right choice, especially if you want to feed the data into a machine learning pipeline or use any of the numerous libraries that the Python ecosystem offers.

Getting this to work on macOS requires a few steps (tested on macOS 11

@madelinegannon
madelinegannon / setup-azure-kinect-on-jetson-x-nx.md
Last active April 18, 2024 17:03
Notes on Setting up the Microsoft Azure Kinect on Ubuntu 18.04
@rlanyi
rlanyi / PKPass.md
Last active April 2, 2024 14:54
How to create Apple PKPass .p12 certificate using Linux

How to create Apple PKPass .p12 certificate using Linux

You don't need a Mac to do this :-)

For generating PKPass files, you'll need 4 things after this tutorial:

  • Certificate Identifier (pass.com.example.www)
  • Team Identified (Organizational Unit (OU) in the cert generated by Apple)
  • The .p12 file
  • The password for the .p12 file
@jsigee87
jsigee87 / todo-linter.sh
Created April 26, 2020 23:05
Script to find todo and fixme statements
#!/usr/bin/env bash
# Who am I
######################################################################
MYFILENAME="todo-linter.sh"
if [ $# -eq 0 ] || [ $# -gt 1 ];
then
echo "Usage:"
echo " bash ${MYFILENAME} [file or filepath]"
@EnesKaraosman
EnesKaraosman / RandomColor.swift
Last active July 14, 2023 09:35
Generatin random color in SwiftUI & UIKit
#if canImport(UIKit)
import UIKit
extension UIColor {
static var random: UIColor {
return UIColor(
red: .random(in: 0...1),
green: .random(in: 0...1),
blue: .random(in: 0...1)
)
@spencersalazar
spencersalazar / easeInOut.h
Created January 27, 2020 05:09
Generic easing function with tweakable power and midpoint.
/** Ease in/out function with settable power and midpoint.
Use p parameter to adjust speed at endpoints (cubic: p=3, quartic: p=4)
Midpoint is point at which speed is fastest and uneased.
@param t time or independent variable in range [0,1]. Input should be scaled to this range from whatever source range is expected.
@param p power, e.g. quadratic=2, cubic=3. Non-integral powers can be used to fine-tune the curve.
@param mid midpoint of curve, where it is "most linear".
@return output value in range [0,1]. Can be multiplied to scale to desired range.
# git clone https://github.com/NVlabs/stylegan2
import os
import numpy as np
from scipy.interpolate import interp1d
from scipy.io import wavfile
import matplotlib.pyplot as plt
import PIL.Image
import moviepy.editor
import dnnlib
//
// WaveformView.swift
// WaveformSwiftUI
//
// Created by Adam Bell on 9/4/19.
// Copyright © 2019 Adam Bell. All rights reserved.
//
import SwiftUI
import PlaygroundSupport
import SwiftUI
extension UIView {
var renderedImage: UIImage {
let image = UIGraphicsImageRenderer(size: self.bounds.size).image { context in
UIColor.lightGray.set(); UIRectFill(bounds)
context.cgContext.setAlpha(0.75)
self.layer.render(in: context.cgContext)
}
return image
@madelinegannon
madelinegannon / jetson-nano_openFrameworks_setup_tutorial.md
Last active February 4, 2024 16:41
How to Set Up the NVIDIA Jetson Nano for openFrameworks