Skip to content

Instantly share code, notes, and snippets.

View neilbalch's full-sized avatar
🏠
Working from home

Neil neilbalch

🏠
Working from home
View GitHub Profile
@neilbalch
neilbalch / ScopedTimer_test.cpp
Created March 4, 2022 07:54
C++ Simple Scoped Timer
#include <iostream> // cout
#include <string> // string
#include <chrono> // time_point, duration, microseconds
#include <thread> // this_Thread::sleep_for
template <typename Clock>
class ScopedTimer {
public:
ScopedTimer(const std::string& name) : name(name), start(Clock::now()) {}
~ScopedTimer() {
@neilbalch
neilbalch / main.c
Last active October 1, 2021 23:18
STM32cube USB VCP doesn't appear on Windows 10
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file : main.c
* @brief : Main program body
******************************************************************************
* @attention
*
* <h2><center>&copy; Copyright (c) 2021 STMicroelectronics.
* All rights reserved.</center></h2>
@neilbalch
neilbalch / notes.md
Last active April 10, 2020 20:09
Marlin Configuration File Refactor/Reformatting Notes

Notes

Configuration.h

  • Serial Port(s)
    • SERIAL_PORT
    • SERIAL_PORT_2
    • BAUDRATE
  • Hardware Identification
  • MOTHERBOARD
@neilbalch
neilbalch / Configuration.h
Created April 6, 2020 00:38
04052020: Marlin BLTouch config attempts to move past X-axis limits when homing Z
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
@neilbalch
neilbalch / Program.cs
Last active February 25, 2018 19:24
KeyboardLocks Toast Message Version
using System;
//using System.Collections.Generic;
//using System.Linq;
//using System.Threading.Tasks;
using System.Windows.Forms;
using System.Threading;
using System.Drawing;
namespace KeyboardLocksIndicator {
static class Program {