Skip to content

Instantly share code, notes, and snippets.

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

Pharap Pharap

🇺🇦
Путин - клептократический тиран
  • 12:24 (UTC +01:00)
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 / 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.
@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 / 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 / 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 / CC0.txt
Last active June 6, 2020 21:23
Pokitto Serial Example
Creative Commons Legal Code
CC0 1.0 Universal
CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
@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);