GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • All gists
  • Back to GitHub
  • Sign in
  • Sign up
  • All gists 19
  • Starred 1
  • Terms
  • Privacy
  • Security
  • Status
  • Community
  • Docs
  • Contact

This view

  • Original page
  • New address

GeezerVison is showing gist.github.com — fDero’s gists

Instantly share code, notes, and snippets.

View fDero's full-sized avatar

Francesco De Rosa fDero

2002, Italy
27 followers · 13 following
  • Cloud9 Reply
  • Naples, Italy
View GitHub Profile
    • Recently created
    • Least recently created
    • Recently updated
    • Least recently updated
  • 3 files
  • 0 forks
  • 0 comments
  • 0 stars
@fDero
fDero / #Measurement-Units.md
Last active November 2, 2026 21:38
Measurement-Units

Measurement-Units

The following is an implementation of a general-purpose flexible and extendible framework for measurement-units in C++23. The core idea is that the user can assign to a variable of type Unit<...> values of which the type is a different unit of measurement, as long as the two variables share a dimension (e.g. Kilometers, Miles, Meters, Yards, they all represent length).

#include "units.hpp"
#include "examples.hpp"
  • 2 files
  • 0 forks
  • 0 comments
  • 0 stars
@fDero
fDero / #GoogleOauthTesting.md
Created February 21, 2026 11:06
Google OAuth Testing

Google OAuth Testing

This gist hosts a simple python script that can be used to retrieve a google oauth 2.0 access token given a client-secret generated via google cloud. You can use a client-secret for a desktop-app, since it makes it easier to generate such secret, especially if you don't have a working frontend just yet.

You can use this setup to test your backend API against real google tokens and eventually go forward with the development in case the frontend is not ready yet at the time you are creating the authentication endpoints.

  • 2 files
  • 0 forks
  • 0 comments
  • 1 star
@fDero
fDero / #ParameterPack.md
Last active January 11, 2026 18:48

ParameterPack

The following is an implementation for an array-style wrapper around C++ parameter packs.

using Pack2 = ParameterPack<bool, float>;
using Pack3 = Pack2::Append<std::string>;

using Pair = typename Pack2::Instantiate<std::pair>;
Pair p = std::pair<bool, float>(true, 3.14);
  • 2 files
  • 0 forks
  • 0 comments
  • 0 stars
@fDero
fDero / #Functions.md
Last active January 11, 2026 14:39

Partial Functions Application in C++

The following is an implementation of haskell-style function application in pure C++.

Function<int, int>::Returning<int> add = [](int a, int b){ return a + b; };
Function<int>::Returning<int> add4 = add(4);

int full_application = add(4, 2);
int partial_application = add4(2); 
  • 1 file
  • 0 forks
  • 0 comments
  • 0 stars
@fDero
fDero / #MindForMusic.md
Created August 25, 2025 18:58

Mind For Music

I've written this script to download all the music scores from https://www.mindformusic.com/bigband.
I just tought it was cool.

for x in $(seq 0 25 875); do
  curl -s "https://www.mindformusic.com/bigband?start=$x" \
    | grep "/bigband/" \
 | grep -oP '(?&lt;=href=")[^"]*' \
  • 2 files
  • 0 forks
  • 0 comments
  • 0 stars
@fDero
fDero / #Sudo-On-Windows.md
Last active July 4, 2025 17:51

Sudo command on Windows (Powershell)

If you ever find yourself working in powershell, you know the pain of having to run a new terminal as an administrator just to run a command or two. You probably dream about having some sort of utility just like sudo on linux but for windows.

First things first, i gotta tell you, big brains at Microsoft HQ have your back, because now, if you go in Settings > System > For Developers you can see Enable sudo

Note

If you want to follow along, use inline mode in the drop-down menu.

  • 4 files
  • 0 forks
  • 0 comments
  • 0 stars
@fDero
fDero / #JavaStackMachine.md
Created February 13, 2025 13:41

Java implementation of a Stack-Machine

A stack machine is a computer processor or a virtual machine in which the primary interaction is moving short-lived temporary values to and from a push down stack. The use of a stack significantly reduces the required number of processor registers. Stack machines extend push-down automata with additional load/store operations or multiple stacks and hence are Turing-complete.

I implemented a stack-machine in java with the intent of evaluating arithmetic expressions assembled at run-time using the following API:

  • 4 files
  • 0 forks
  • 0 comments
  • 0 stars
@fDero
fDero / #LightSpeedFibonacci.md
Last active February 11, 2025 19:39

LightSpeed Fibonacci

An over-engineered and hyper-optimized golang implementation of a function that computes the Nth fibonacci number using arbitrary precision integers.


With arbitrary precision aritmethic comes the huge performance impact of non-constant time arithmetic operations.

  • 2 files
  • 0 forks
  • 0 comments
  • 0 stars
@fDero
fDero / #TestCppMacro.md
Last active February 7, 2025 12:01

Example of a googletest/gtest-style macro

The following code shows how to create a TEST macro that works like the following:

TEST(MySuccessfulTestCase) {
    printf("OK!!");
}

TEST(MyFailedTestCase) {
  • 2 files
  • 0 forks
  • 0 comments
  • 0 stars
@fDero
fDero / #WritersFirstRWMutex.md
Last active February 2, 2025 16:08

Writers First R/W Mutex in Go

This gist showcases how we can create a wrapper around the sync.RWMutex type to create our own version, with the specific intent of making write-locks having strict precedence over read-locks.

This is achieved via the use of an internal atomic counter of type atomic.Int64 that keeps track of pending write-locks, and a sync.Cond condition variable that is used by the RLock() method to wait until no write-locks are pending anymore.

NewerOlder
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.