Skip to content

Instantly share code, notes, and snippets.

View terrillmoore's full-sized avatar

Terry Moore terrillmoore

View GitHub Profile
@terrillmoore
terrillmoore / RTXv5-Blinky+UART.md
Last active January 22, 2017 04:13
Keil RTXv5 (API v2) MCB18xx / LPC18xx RTX-Blinky + UART example

Convert RTX-Blinky from RTXv4 to RTXv5, and add UART Example

There is no example for using a UART in conjunction with RTXv5 as of this writing. This gist presents an adapted example that was tested in conjunction with Keil V5, RTX APIv2 and the Blinky example.

Create the project

Create the RTX_Blinky project in a spare directory using the "Pack Installer" button.

  1. Press the pack installer buttong.
  2. In the left panel, select Boards and select MCB1800>Devices>LPC1857.
  3. In the right panel, select Examples, and then "CMSIS-RTOS Blinky (MCB1800)". Press the [Copy] button.
  4. Select someplace to put the files. The Keil IDE will create subdirectories from this directory. Avoid using an existing location!
@terrillmoore
terrillmoore / TTN-decode-0x14.js
Created May 31, 2017 10:06
Decoding Catena 4450 sensor1 packets for The Things Network
// Updated 2017-04-20 23:08 EDT tmm@mcci.com -- fix typos in comments
// Add this in your application's "payload formats" section of
// https://console.thethingsnetwork.org
function Decoder(bytes, port) {
// Decode an uplink message from a buffer
// (array) of bytes to an object of fields.
var decoded = {};
if (port === 1) {
cmd = bytes[0];
@terrillmoore
terrillmoore / decode-0x14.js
Last active July 19, 2017 19:52
Description, and Node-RED decoding function, for Catena 4450 data record port 1, type 0x14
// this Node-RED decoding function decodes the record sent by the Catena 4450 M101 power monitor
// written in a big hurry, so no points for style
var b = msg.payload; // pick up data for convenience; just saves typing.
// an empty table to which we'll add result fields:
//
// result.vBat: the battery voltage (if present)
// result.vBus: the USB charger voltage (if provided)
// result.boot: the system boot counter, modulo 256
@terrillmoore
terrillmoore / highlightjs-codes.md
Last active October 5, 2019 21:44
List of hightlight.js codes

I needed the list of supported languages for highlightjs, used by Markdown code fences (```).

There is a list at https://highlightjs.org/usage/, but was not readable. But it looked like markdown, so I grabbed it and made a markdown table.

Language Classes Package
1C 1c
ABNF abnf
Access logs accesslog
Ada ada
@terrillmoore
terrillmoore / Scoop-CMake-3.14.7.json
Last active July 19, 2020 22:44
Scoop Manifest for CMake 3.14.7
{
"version": "3.14.7",
"description": "Open-source, cross-platform family of tools designed to build, test and package software",
"homepage": "https://cmake.org/",
"license": "BSD-3-Clause",
"architecture": {
"64bit": {
"url": "https://github.com/Kitware/CMake/releases/download/v3.14.7/cmake-3.14.7-win64-x64.zip",
"hash": "e3ce0bdd966dc9a8e9c57ea949bc195c36c6f843bd3e431990d59c381be7ba8e",
"extract_dir": "cmake-3.14.7-win64-x64"
@terrillmoore
terrillmoore / Scoop-CMake-3.14.0.json
Created July 20, 2020 21:22
Scoop-CMake-3.14.0.json
{
"version": "3.14.0",
"description": "Open-source, cross-platform family of tools designed to build, test and package software",
"homepage": "https://cmake.org/",
"license": "BSD-3-Clause",
"architecture": {
"64bit": {
"url": "https://github.com/Kitware/CMake/releases/download/v3.14.0/cmake-3.14.0-win64-x64.zip",
"hash": "40e8140d68120378262322bbc8c261db8d184d7838423b2e5bf688a6209d3807",
"extract_dir": "cmake-3.14.0-win64-x64"
@terrillmoore
terrillmoore / README.md
Last active March 1, 2021 20:11
Set up XRDP on Ubuntu 18 LTS (Windows client)
@terrillmoore
terrillmoore / README.md
Created March 14, 2021 16:51
Solve nacl wget install problem without disabling certificate checks

Solve NaCl wget install problem

Problem statement

The NaCl install instructions http://nacl.cr.yp.to/install.html state:

Here is how to download and compile NaCl:

wget https://hyperelliptic.org/nacl/nacl-20110221.tar.bz2
@terrillmoore
terrillmoore / Scoop-CMake-3.20.4.json
Last active July 14, 2021 22:04
Scoop manifest for CMake-3.20.4
{
"version": "3.20.4",
"description": "Open-source, cross-platform family of tools designed to build, test and package software",
"homepage": "https://cmake.org/",
"license": "BSD-3-Clause",
"architecture": {
"64bit": {
"url": "https://github.com/Kitware/CMake/releases/download/v3.20.4/cmake-3.20.4-windows-x86_64.zip",
"hash": "965d2f001c3ca807d288f2b6b15c42b25579a0e73ef12c2a72c95f4c69123638",
"extract_dir": "cmake-3.20.4-windows-x86_64"
@terrillmoore
terrillmoore / wordpress-import-update.php
Created January 23, 2021 16:21 — forked from ssuess/wordpress-import-update.php
Force the WordPress importer to update existing posts instead of skipping them
<?php
/**
* When using the WordPress Importer, update existing
* posts instead of skipping them. Updates content according
* to the import file even if the existing post was updated
* more recently.
*
* To use, drop this file into your /mu-plugins/ folder or
* copy this code into your functions.php file.