Skip to content

Instantly share code, notes, and snippets.

View Pharap's full-sized avatar
🇺🇦
Путин - клептократический тиран

Pharap Pharap

🇺🇦
Путин - клептократический тиран
  • 05:27 (UTC)
View GitHub Profile
@Pharap
Pharap / url.txt
Created July 31, 2023 08:34
Arduboy JSON Editor URL
https://www.jeremydorn.com/json-editor?schema=N4IgJAzgxgFgpgWwIYgFwhgF0wB1QenwCsIB7AOwFpp5kA6UgJwHN8ATRpAM00oAYALPhqIkAYhAAaEJgCeOOGhCkARkThRMUmQEtMAG0Xod5LqTokKAAhNR9AVzZw2N8laRW6SRm3srSslZcOobaTtCMOjiYOhRKAMIUmHDkmBBWpFxWmPCuZhZkbsGGrnaOzq7unt6+/oHFcJJW9hAVKoHI5EjMcIzu5C76pEhOfTiMpMycCOmYpM04QyPVPn4BQSFws/NIbgCCq3VWzEgIJsxWELIQyQh02uOkCowxW2igIsgAar0QseTvGTyIwgEzJHqMMJwLhIez6LSoABM0jO5B0CHsCDQyJAyAAHujMdjpDEDCCAMqwURWABuv3+UIiURicXQABVcp8PHTGH9rAB3GA6WDZXImfKWNxQUgIRY6LZWfl6GB0KwcnTpLk2dI8vluREgAC+JL0oVQoDkCiUN0i5GY2lRABkUswcmgAIwmslKNmmxTScJQSLRBnoPbZP1BJhWOA82Q5c5WaWpJAmCpKhNuBPpLyHdYNe7GkCB4MsgHmoFW9A287aUlmkAAES2QeZDIDLdLoZA4ZLbesmSjfVjvXjQrtSaSqfI6eVJlFGpWtXzm0L0lhOSYgMtIJrdodJmddrdqE9um9Yfsm8hHaZIdZIA5cHcV5g0cHOWfuccRwLVgAsnCMSLM+G5vrySa7FYKjPl0CAVPOn6XKcz57swa4gLqoYWsC1qYLa9oooeLonme9Ygj8vLtsWnb9uWj65IwcCGEgrS0vSA5ZNmS5rPUq5GgGSDJNuuHVvhtbruQsgAPJcGgADaoBmIwyAIsWQmKMaSlMKpShsBplAxPBRoALpeg2jYaf0LhGf6NF3mWPq5PpyTWVYAAUTxlkg+gAJQRvBGRZExLGtE084AJLktJVgABwAGx8O6Q6qaqACidDoVYiJJQA7PwiKUIiADMGR9Dl7r5XwhUl
#include <Arduboy2.h>
Arduboy2 arduboy;
void setup()
{
arduboy.begin();
}
void loop()
{
@Pharap
Pharap / TextTest.ino
Created August 22, 2020 03:04
Demonstrating different combinations of text parameters on Arduboy
#include <Arduboy2.h>
Arduboy2 arduboy;
// This code is under the CC0 licence
// and hence is in the public domain,
// or your local equivalent.
void setup()
{
@Pharap
Pharap / C++ Compilation.md
Last active June 13, 2021 17:32
A rough description of C++ compilation. Good enough for an introduction, but not particularly technical.

The C++ build process is roughly as thus:

  1. All .cpp (and possibly .c) files are compiled:
    1. First the preprocessor processes the file, it (as required):
      • Parses and processes all #defined macros, storing their definitions in a symbol table (a string to string dictionary).
      • Parses and processes all #if, #elif and #endif macros, thus performing conditional compilation.
      • Parses and processes all #included header (.h) files, which includes inserting the contents of the header file into the point at which it was #included (or performs a process that achieves the equivalent effect).
      • Parses and processes all #pragmas, implementing their compiler-specific behaviour.
        • Note that the most common and widely supported #pragma is #pragma once, which acts as an alternative to include guards.
@Pharap
Pharap / WindowsKeyboardCombos.md
Last active June 13, 2021 17:32
Windows Keyboard Combos
@Pharap
Pharap / CallOfCthulhu.h
Created May 15, 2020 09:07
The Call of Cthulhu
namespace Cthulhu
{
template< typename T >
void fhtagn(T & object)
{
// ph'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn!
ph_nglui(object);
mglw_nafh(object);
R_lyeh(object);
wgah_nagl(object);
@Pharap
Pharap / Arduborg.hex
Last active December 12, 2019 22:57
Resistance is futile
:100000000C948E030C94B6030C94B6030C94B603B4
:100010000C94B6030C94B6030C94B6030C94B6037C
:100020000C94B6030C94B6030C9475070C94E40777
:100030000C94B6030C94B6030C94B6030C94B6035C
:100040000C94B6030C94B6030C94B6030C94B6034C
:100050000C94B6030C94B6030C94B6030C94160AD5
:100060000C94B6030C94B6030C94B6030C94B6032C
:100070000C94B6030C94B6030C94B6030C94B6031C
:100080000C94B6030C94B6030C94B6030C94B6030C
:100090000C94B6030C94B6030C94B6030C94B603FC
@Pharap
Pharap / Programming Sins.md
Created October 11, 2019 02:06
A list of so-called 'programming sins'

Programming Sins

  • Magic numbers
    • Constants with a specific meaning should be clearly named
    • Possible exceptions include:
      • 0, 1 and 2 where usage is unambiguous
      • arguably the shift and mask values when doing bitshifting and masking
  • Single-letter variables names
    • With the possible exceptions of:
  • x and y for coordinates
@Pharap
Pharap / FunniestBugs.md
Last active June 13, 2021 17:53
A collection of amusing software bugs

Funniest Bugs

Video Games

Bethesda

Morrowind

  • Ordinarily if you are kicked out of the Mages Guild you must talk to the Arch-Mage to be reinstated. Later in the quest line you can become the Arch-Mage by killing the previous Arch-Mage. If you are then expelled from the guild after having become the Arch-Mage by killing the former Arch-Mage then you can no longer be reinstated into the guild because there will no longer be an Arch-Mage to talk to.