Skip to content

Instantly share code, notes, and snippets.

View GLMeece's full-sized avatar

Greg Meece GLMeece

View GitHub Profile
@GLMeece
GLMeece / latency_numbers.md
Last active April 29, 2024 09:47
Latency Numbers Every Programmer Should Know - MarkDown Fork

Latency Comparison Numbers

Note: "Forked" from Latency Numbers Every Programmer Should Know

Event Nanoseconds Microseconds Milliseconds Comparison
L1 cache reference 0.5 - - -
Branch mispredict 5.0 - - -
L2 cache reference 7.0 - - 14x L1 cache
Mutex lock/unlock 25.0 - - -
@GLMeece
GLMeece / Steps_to_Terminal_Enlightenment_on_a_Mac.md
Last active April 29, 2024 05:17
Steps to Terminal Enlightenment on a Mac (tweaking your terminal for fun and profit)
@GLMeece
GLMeece / unicode_for_kbd_symbols.md
Created December 7, 2022 21:07
Unicode for Keyboard Symbols

Unicode for Keyboard Symbols

  • ⎋ (escape): U+238B
  • ⇥ (tab): U+21E5
  • ⇪ (caps lock): U+21EA
  • ⇧ (shift): U+21E7
  • ⌃ (control): U+2303
  • ⌥ (option): U+2325
  •  (Apple): U+F8FF (in some Apple-provided fonts only)
  • ⌘ (command): U+2318
@GLMeece
GLMeece / nano_install_and_config.md
Last active March 7, 2024 18:02
NANO on macOS and Windows

NANO on macOS and Windows

This should get you up and running with the installation and basic configuration of GNU Nano on both macOS and Windows. In the case of macOS, this will install a newer version of Nano that includes syntax highlighting.

macOS Installation

Homebrew

It is assumed you already have Homebrew installed. If not, then Verify or Install Apple's Command-line Tools and then proceed with the installation of Homebrew. 🍺

@GLMeece
GLMeece / Sphinx_Setup_for_autodoc.md
Last active November 29, 2023 14:22
Setting up Sphinx for generating documentation from DocStrings, leveraging the Napoleon extension.

Sphinx Setup for autodoc

Sphinx is a documentation generator that is the de facto standard for Python projects. The official documentation can be a bit daunting as it includes so many options, it's hard to know where to start.

Note: This Gist was updated on 04/04/2019 to accomodate a newer version of Sphinx, as well as Python 3.7. YMMV!

This document is written with the following presuppositions:

@GLMeece
GLMeece / robocop_rules.txt
Created September 20, 2023 15:53
Robocop Rules List
Rule - 0201 [W]: missing-doc-keyword: Missing documentation in '{{ name }}' keyword
Rule - 0202 [W]: missing-doc-test-case: Missing documentation in '{{ name }}' test case
Rule - 0203 [W]: missing-doc-suite: Missing documentation in suite
Rule - 0204 [W]: missing-doc-resource-file: Missing documentation in resource file
Rule - 0301 [W]: not-allowed-char-in-name: Not allowed character '{{ character }}' found in {{ block_name }} name
Rule - 0302 [W]: wrong-case-in-keyword-name: Keyword name '{{ keyword_name }}' does not follow case convention
Rule - 0303 [E]: keyword-name-is-reserved-word: '{{ keyword_name }}' is a reserved keyword{{ error_msg }}
Rule - 0305 [W]: underscore-in-keyword-name: Underscores in keyword name '{{ keyword_name }}' can be replaced with spaces
Rule - 0306 [W]: setting-name-not-in-title-case: Setting name '{{ setting_name }}' should use title or upper case
Rule - 0307 [W]: section-name-invalid: Section name should be in format '{{ section_title_case }}' or '{{ section_upper_case }}'
@GLMeece
GLMeece / robotframework.code-snippets
Last active August 19, 2023 10:50
Robot Framework VS Code snippets; place in your .vscode directory
{
"Test Suite": {
"prefix": "suite",
"body": [
"*** Settings ***",
"Documentation ${1:What does this testing suite cover?}\n",
"Library String # just an example",
"Library \\${EXECDIR\\}/path/to/CUSTOM_LIBRARY.py",
"Resource \\${EXECDIR\\}/path/to/NAME_OF_ANOTHER.resource\n",
"Suite Setup SETUP_HERE",
"""Nice Title Case Function plus quick demo"""
def nice_title_case(str_in: str) -> str:
"""Converts a string to Title Case, with conventional exceptions which
need not be capitalized if they are not the first word in the title.
Reference: https://en.wikipedia.org/wiki/Title_case
*Note*: Prepositional rules are not strictly enforced
@GLMeece
GLMeece / remove_personal_onedrive_listing.md
Last active August 9, 2023 00:55
Remove Personal OneDrive Listing from Windows 10/11

Summary

If you have a company-managed OneDrive account like I do, you probably will never need or want to access a personal OneDrive account. It clutters up the Explorer menu and it's likely that you would prefer not to see it.

How to Stop Personal OneDrive from Being Pinned in Explorer

  1. Open RegEdit (RegistryEditor): type regedit in the start menu and it should come up (select it)
  2. At the top, where it says Computer paste the following to the right of it (i.e., don't delete Computer):

\HKEY_CLASSES_ROOT\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}

@GLMeece
GLMeece / runtime_os_info.py
Last active August 8, 2023 06:09
Get OS info at runtime
#!/usr/bin/env python
import os
import platform
"""
Utility functions for determining Operating System info at runtime.
- *Module*: runtime_os_info
- *Platform*: Unix, Mac, Windows