Skip to content

Instantly share code, notes, and snippets.

View terrillmoore's full-sized avatar

Terry Moore terrillmoore

View GitHub Profile
@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.
@terrillmoore
terrillmoore / README.md
Last active March 1, 2021 20:11
Set up XRDP on Ubuntu 18 LTS (Windows client)
@terrillmoore
terrillmoore / Adapt-IPFire-conf-for-Asus-WRT.md
Last active June 10, 2023 14:50
Adapting IPFire net-to-net client config for OpenVPN in ASUS WRT routers

Adapting IPFire net-to-net client config for OpenVPN in ASUS WRT routers

IPFire supports net-to-net connections.

Part of setting up the connection with non-IPFire peers often involves generating a .ovpn file from the client package.

There are some client docs about how to do this, but not net-to-net.

For net-to-net clients, IPFire generates a zip file containing two files. Both files are named based on the name you choose for the VPN.

@terrillmoore
terrillmoore / PSpice-for-TI-and-Git-coexistance.md
Last active October 11, 2021 00:54
Make PSpice for TI work in conjunction with git for windows

Make PSpice for TI work in conjunction with Git for Windows

I recently installed PSpice for TI (version 17.4-2020 S002 Windows SPB 64-bit edition).

After installing, Git for Windows bash no longer worked as expected. Instead of starting up in my home directory, it started up in the (emulated) root directory; and it didn't load my profile. (In other words, installing PSpice for TI broke my Git for Windows installation.)

Investigation revealed that the installation had created an environment variable HOME in my profile, with the value c:\mcci\projects\SBP_Data. It was easy enough to fix this.

  • Control Panel
  • System
@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 / 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 / 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 / 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 [email protected] -- 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 / 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!