Skip to content

Instantly share code, notes, and snippets.

@eduardo22i
eduardo22i / Firebase Topics
Created December 15, 2017 15:54
An Extension of Firebase Messaging To Get Topics
extension Messaging {
static private let accessToken = "" //Server Web Key
struct Topic : Decodable {
var name : String?
var addDate : String?
}
struct Rel : Decodable {
@ethanhuang13
ethanhuang13 / xcode-beta-slink.sh
Last active February 3, 2023 20:21
Symbolic link from Xcode.app to Xcode-beta.app (Xcode 11.2)
@kristopherjohnson
kristopherjohnson / LowPassFilterSignal.swift
Last active June 10, 2024 05:30
Simple implementation of low-pass filter
struct LowPassFilterSignal {
/// Current signal value
var value: Double
/// A scaling factor in the range 0.0..<1.0 that determines
/// how resistant the value is to change
let filterFactor: Double
/// Update the value, using filterFactor to attenuate changes
mutating func update(newValue: Double) {