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 / build.sh
Created September 6, 2019 21:37 — forked from madhikarma/build.sh
xcodebuild script
#!/bin/sh
set -eo pipefail
IFS=$'\n\t'
# Constants
NOW=$(date +%s)
BUILD_FILE_NAME="MyApp-${NOW}"
SCHEME="MyApp"
WORKSPACE="MyApp"
PROJECT="MyApp"
@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 / esxi-iso-to-boot-usb.sh
Created October 24, 2019 19:36
Create bootable USB installer for vSphere ESXi Using MacOS
#!/bin/bash
#
#
# Create bootable USB installer for vSphere ESXi on macOS
# 1) Boot using the resulting installer
# 2) Install ESXi to a second high-speed USB 3.0 device
# 3) Make a copy of the installed USB ESXi for emergencies
#
# https://github.com/cbednarski/vmware-usb-osx
#
@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 / sortObjectListByKeyName.js
Last active October 2, 2020 14:40
ES6 sort object array by key name
arrayList.sort((a, b) => {
const textA = a.name.toUpperCase();
const textB = b.name.toUpperCase();
return (textA < textB) ? -1 : (textA > textB) ? 1 : 0;
});
@esutton
esutton / adb-cap.sh
Last active March 2, 2021 20:50
Capture screenshot from adb connected Android device & save to ~/Desktop
#!/bin/sh
############################################
# File: adb-cap.sh
# -----------------------
# Script to capture screenshot to file from adb connected Android device and save to ~/Desktop.
#
# Free for any use.
# Tested on macOS
# Debug on: set -x
@esutton
esutton / cpplint_to_cppcheckxml.py
Last active August 11, 2021 14:48
Convert output from Google's cpplint.py to the cppcheck XML format for consumption by Jenkins cppcheck plugin
#!/usr/bin/env python
# Convert output from Google's cpplint.py to the cppcheck XML format for
# consumption by the Jenkins cppcheck plugin.
# Reads from stdin and writes to stderr (to mimic cppcheck)
# https://stackoverflow.com/questions/14172232/how-to-make-cpplint-work-with-jenkins-warnings-plugin
import sys
@esutton
esutton / svn-to-git-import.md
Last active April 27, 2022 14:31
SVN import to Git

Import SVN commit history from SVN to git

svn-repo=url/path/to/svn/repo
dest-repo-name=my-repo

Create authors.txt file for importing change history

svn checkout ${svn-repo} working-folder
cd working-folder
@esutton
esutton / how-to-install-qt-for-mcus-on-win10-vs2019.md
Last active April 27, 2022 20:10
Install Qt for MCU on Windows 10 Host with Visual Studio 2019 Installed

Overview ( Warning: This Does Not Work )

Installing a working copy of Qt for MCUs (commercial license) on Windows 10 with Visual 2019 is very complex. I have yet to succeed. VS 2019, CMake, and indvidual components dependencies for Qt for MCU are a mess.

I have used Qt for desktop development Linux, Windows, and macOS for over 10 years. I have never had a more difficult time.

Is there an easier way?

  • Install Qt 6.3 desktop first, followed by Qt for MCU? ( This did not seem to work either )

Windows 10

@esutton
esutton / debugDumpHexBytes.cpp
Last active July 20, 2022 20:18
Debug print bytes in hexadecimal format 16-bytes per row similar to a hex editor display
/// Debug dump bytes in hexadecimal format 16-bytes per row
///
/// \param source
/// \param length
///
/// Example Output:
/// \code
/// 0000 bd 7a 32 13 08 1c 1e d9 - c9 48 48 0b 5f 23 1a f5
/// 0010 72 3d 8f 7a e6 2c 07 e4 - 6e 45 79 0f cb 18 13 6f
/// \endcode