Skip to content

Instantly share code, notes, and snippets.

@Mohsenqaysi
Mohsenqaysi / gist:f98caba707b20bf1faeb5a009e914596
Created November 28, 2022 20:59 — forked from shinyquagsire23/gist:f7907fdf6b470200702e75a30135caf3
Philips Hue BLE Services and Characteristics (WIP)
DeviceInfo(softwareRevision, isOn,
SceneLightState(color, powerOnBehavior, deviceInfo
Light(id,
Capabilities(dimmable, customState
PowerOnBehavior(option
hueplay, huebloom, hueiris, huelightstrip, huego, plug, bollard, wallspot, groundspot, flexiblelamp, wallshade, walllantern
[ea:44:13:bd:db:59] Service [b8843add-0000-4aa1-8794-c3f462030bda] Unknown, ble_firmware_update?
[ea:44:13:bd:db:59] Characteristic [b8843add-0004-4aa1-8794-c3f462030bda]
import UIKit
// Linked List
// need to keep track of where the list begins and ends.
// value: data
// next and previous: poninters
public class Node {
var value: String // non-optional value
var next: Node? // must be optional so we can point to nil
@Mohsenqaysi
Mohsenqaysi / SceneKitCheatSheet.swift
Created May 25, 2018 05:54 — forked from armadsen/SceneKitCheatSheet.swift
Cheat sheet for SceneKit learning app (Swift)
// Configure the Scene View
self.sceneView.backgroundColor = .darkGrayColor()
// Create the scene
let scene = SCNScene()
//
// ViewController.swift
// AnimateUIButton
//
// Created by Mohsen Qaysi on 5/12/17.
// Copyright © 2017 Mohsen Qaysi. All rights reserved.
//
import UIKit
//: Playground - noun: a place where people can play
import UIKit
let now = Date()
let pastDate = Date(timeIntervalSinceNow: -60 * 60 * 24 * 7 * 4 * 4)
//
//extension Date {