Skip to content

Instantly share code, notes, and snippets.

View esutton's full-sized avatar

Eddie esutton

  • Fly-over state
View GitHub Profile
@esutton
esutton / debugDumpHexBytes.h
Last active February 28, 2024 06:46
Print a string buffer in hex 16-bytes per row in Objective C
// debugDumpHexBytes.h
#ifndef DebugHelper_h
#define DebugHelper_h
#import <Foundation/Foundation.h>
#ifdef NDEBUG
// do nothing
#define DbgLog(...)
@esutton
esutton / get-ntrip-source-table.py
Last active August 3, 2023 17:44
HTPP Get NTRIP Server SOURCETABLE
#!/usr/bin/env python
#################################
# Get SOURCETABLE from an NTRIP server to discover mount points.
#
# Example:
#
# GET / HTTP/1.0
# Host: ok.smartnetna.com:10000
# User-Agent: MyAppName
@esutton
esutton / macos-installer-to-iso.sh
Last active January 12, 2023 05:25
Create macOS Catalina Bootable ISO Image
#!/bin/sh
#
# File: macos-installer-to-iso.sh
#
# Create a bootable ISO image from a macOS installer to install VMware ESXi guests.
#
# https://gist.github.com/Kutkovsky/613e29f35d3ef420b23b59ecdf7a28e0
# Debug on: set -x
set -eux
@esutton
esutton / nad83-to-wgs84.py
Last active January 11, 2023 16:48
NAD83 to WGS84 - Python
# https://gis.stackexchange.com/questions/304231/converting-nad83-epsg4269-to-wgs84-epsg4326-using-pyproj
# Output:
# (-80.00001, 40.00001)
# (-80.00001904501643, 40.00003299028925)
# (-80.00001618601023, 40.00001788467985)
#
# projections, datums, transformations, coordinates
from pyproj import Proj, transform
p2 = Proj(init='epsg:4326')
@esutton
esutton / nad83-to-wgs84.js
Created January 11, 2023 16:47
NAD83 to WGS84 - JavaScript NodeJs
// - https://www.getbounds.com/blog/rtk-to-wgs84/
//
// Output:
// nad83: https://www.google.com/maps?q=36.2929067,-97.308243
// wgs84: https://www.google.com/maps?q=36.29291304405147,-97.30825093744994
import proj4 from 'proj4';
// The transformation in this example (known as the ITRF00 transformation) came from ArcGIS Desktop 10.7
function coordRTKtoWGS84(point) {
@esutton
esutton / git-cheatsheet.md
Last active December 14, 2022 16:42
Git Cheatsheet

Git Cheatsheet

Create New branch and Push to Remote

# Use <yourInitials>/branch-name to organize your branches
git checkout -b my/new-branch
git push origin my/new-branch

Switch to Branch

@esutton
esutton / yocto.md
Last active December 7, 2022 20:21
Yocto

References:

I expect an Azure self-hosted agent is required due to large storage requirements.

you can reuse the downloads and sstate-cache folders that it generated to speed up future builds (sometimes called "incremental" or "short" builds)

rm_work drastically reduces the storage space used while downloads and sstate-cache drastically reduce the build time, usually to under 30 minutes i.e.

@esutton
esutton / get-ntrip-source-table.py
Created December 7, 2022 16:28
Get NTRIP mountpoints or SOURCETABLE using Python
#!/usr/bin/env python
#******************************
# get-ntrip-source-table.py
#
# Get a NTRP server's SOURCETABLE mount points
#
# Verify host and port using wget or curl
# `
# curl --http0.9 rtgpsout.unavco.org:2101
@esutton
esutton / myproject.pro
Last active October 27, 2022 15:24
Qt qmake project file flags to add
# Qt qmake project file
# Need c++11 to use nullptr ( GCC 4.7 added C++11 )
CONFIG += c++11
# Use the compiler - Turn on *everything* you can
# Always use -Werror else warnings mean nothing after awhile
QMAKE_CXXFLAGS += -Wall
QMAKE_CXXFLAGS += -Werror
@esutton
esutton / cypress-checksum.py
Last active October 3, 2022 14:26
Calculate Cypress EZ-Serial BLE Firmware Checksum for a Hex String Input
##########################################
# File: cypress-checksum.py
#
# Calculates EZ Serial checksum from hex string input and appends
# - Hex string input does not require space separated hex bytes
# - Cut & paste output into serial terminal connected to CYBT-483056-EVAL
# - Default Baud 115,200, N, 8, 1
#
# See:
# EZ-Serial BLE Firmware Platform User Guide