Skip to content

Instantly share code, notes, and snippets.

View itripn's full-sized avatar

Ron Forrester itripn

  • Artifact Uprising
  • PDX
View GitHub Profile
@itripn
itripn / timeDate.cpp
Created June 18, 2020 03:20
ESP8266 NTP function for getting time/date with some sanity checking
#include <NTPClient.h>
#include <WiFiUdp.h>
WiFiUDP ntpUDP;
NTPClient timeClient( ntpUDP, "pool.ntp.org", 0 /*GMT*/ );
void getTimeStamp( char *dateBuf ) {
int retryCount = 5;
@itripn
itripn / animal-facts.z80
Created April 2, 2020 22:32
Animal Facts Game
; Welcome in ASM80.COM.
NAMELEN EQU $0A
RESPLEN EQU $20
MAXANIMALS EQU $06
.ORG $8000
START:
;
; Output Prompt

Keybase proof

I hereby claim:

  • I am itripn on github.
  • I am itripn (https://keybase.io/itripn) on keybase.
  • I have a public key whose fingerprint is A415 25BC A8FC A039 B441 55AE F151 58BF 61A0 586E

To claim this, I am signing this object:

@itripn
itripn / UIColorRGB.swift
Last active December 21, 2015 04:21
Simple extension to UIColor to allow manipulating RGB values without exposing the ugly Objc pointers in the API.
// developed via conversation with @bdpdx (https://github.com/bdpdx) -- although
// he prefers a version with an optional instead of NOCOLOR, and he's almost
// certainly right about that... If you like, change the rgba var to be an optional
// and in the else for the guard return nil.
//
extension UIColor {
static let NOCOLOR: color_components = ( red: -1, green: -1, blue: -1, alpha: -1 )
public typealias color_components = ( red: CGFloat, green: CGFloat, blue: CGFloat, alpha: CGFloat )