Skip to content

Instantly share code, notes, and snippets.

@rlanyi
rlanyi / PKPass.md
Last active May 7, 2024 01:43
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
@thesephist
thesephist / options.oak
Created November 14, 2022 22:09
Collection of useful Stable Diffusion prompt modifiers
{ name: 'Lighting', options: [
'golden hour, warm glow'
'blue hour, twilight, ISO12000'
'midday, direct lighting, overhead sunlight'
'overcast, whitebox, flat lighting, diffuse'
'dreamlike diffuse ethereal lighting'
'dramatic lighting, dramatic shadows, illumination'
'studio lighting, professional lighting, well-lit'
'flash photography'
'low-key lighting, dimly lit'
@Jaybles
Jaybles / UIDeviceHardware.h
Created October 28, 2011 19:33
UIDeviceHardware - Determine iOS device being used
//
// UIDeviceHardware.h
//
// Used to determine EXACT version of device software is running on.
#import <Foundation/Foundation.h>
@interface UIDeviceHardware : NSObject
- (NSString *) platform;
@rbobbins
rbobbins / cocoa_touch_best_practices.md
Created June 12, 2015 21:13
Cocoa Touch Best Practices

Cocoa Touch Best Practices

Speaker: Luke Hiesterman, UIKit Engineer

Agenda

  • App lifecycle
  • Views and view controllers
  • Auto layout
  • Table and collection views

Goals

@kittinan
kittinan / client.py
Last active April 30, 2024 03:37
Python OpenCV webcam send image frame over socket
import cv2
import io
import socket
import struct
import time
import pickle
import zlib
client_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
client_socket.connect(('192.168.1.124', 8485))
@dkun7944
dkun7944 / ContentView.swift
Created July 31, 2023 03:36
AirDrop iOS 17 Swift.Shader Animation
//
// ContentView.swift
// Airdrop Demo
//
// Created by Daniel Kuntz on 7/30/23.
//
import SwiftUI
struct ContentView: View {
@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
You are Webby, a website creation assistant.
Carefully adhere to the following steps for our conversation. Do not skip any steps!:
1. Introduce yourself
2. Ask my name and where I'm from. Offer me the option to continue in a different language, but default to English. In the next message say something personal and kind about where I'm from and include an emoji that references where I'm from.
3. Give me an extremely brief overview of how the website building process will go. Use numbered steps and emojis.
4. Ask what type of website I want to make (offer examples)
5. Ask what I'd like to title the website.
6. Ask a series of questions to clarify information and constraints for the website
/** A simple kalman filter example by Adrian Boeing
www.adrianboeing.com
*/
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
double frand() {
return 2*((rand()/(double)RAND_MAX) - 0.5);
@budidino
budidino / string-truncate.swift
Last active April 3, 2024 20:11 — forked from vicc/string-truncate.swift
String truncate extension for Swift 4
extension String {
/*
Truncates the string to the specified length number of characters and appends an optional trailing string if longer.
- Parameter length: Desired maximum lengths of a string
- Parameter trailing: A 'String' that will be appended after the truncation.
- Returns: 'String' object.
*/
func trunc(length: Int, trailing: String = "") -> String {
return (self.count > length) ? self.prefix(length) + trailing : self