Skip to content

Instantly share code, notes, and snippets.

View romanroibu's full-sized avatar
👾
breaking things

Roman Roibu romanroibu

👾
breaking things
View GitHub Profile
@romanroibu
romanroibu / Cache.swift
Last active May 14, 2018 03:36 — forked from raulriera/Cacher.swift
Code sample for Medium article about Caching and Protocols
//This is basically a description of the cache along with the type
public struct Cache<T> {
let fileName: String
let transform: (T) throws -> Data
let reverse: (Data) throws -> T
}
extension Cache {
//You can define a "convenience" initializer that takes a fileName,
//and provides PList serialization as transform and reverse transform operations
@romanroibu
romanroibu / RSSFeed.swift
Last active April 9, 2021 15:28 — forked from kharrison/RSSFeed.swift
Swift Decodable With Multiple Custom Dates (https://useyourloaf.com/blog/swift-codable-with-custom-dates)
import Foundation
extension DateFormatter {
static let iso8601Full: DateFormatter = {
let formatter = DateFormatter()
formatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ"
formatter.calendar = Calendar(identifier: .iso8601)
formatter.timeZone = TimeZone(secondsFromGMT: 0)
formatter.locale = Locale(identifier: "en_US_POSIX")
return formatter
@romanroibu
romanroibu / README.md
Last active February 7, 2023 03:25 — forked from pfaion/README.md
RealSense2 Backend for Pupil Capture v2.3+

RealSense2 Backend for Pupil Capture v2.3+

With Pupil v1.22, built-in support for RealSense cameras was removed. See the release notes for more information. However, the previous code will still function and can be imported as a user plugin into Pupil Capture.

There are two different ways to setup and use this plugin:

1) Running Pupil from source

When running Pupil from source, you will have to install pyrealsense2, normally just with pip install pyrealsense2 into the environment you use to run Pupil. Then download the realsense2_backend.py file from this gist and place it into your pupil source folder in: pupil/pupil_capture_settings/plugins/realsense2_backend.py