Skip to content

Instantly share code, notes, and snippets.

View aokellermann's full-sized avatar

Antony Kellermann aokellermann

View GitHub Profile
@aokellermann
aokellermann / config.yml
Last active November 25, 2022 15:19
CircleCI config for continuous deployment of .NET NuGet packages using GitVersion with GitHub Packages
# How to get up and running
# 1. This config using dependency caching. If you don't want this, remove the save_cache and restore_cache
# steps. If you want to keep it, replace Contracts/Contracts.csproj in this file with your csproj path.
# If you have multiple csproj files you want to cache, append -{{ checksum "Another/Another.csproj" }}
# to the cache key, where Another/Another.csproj is the path to another csproj file.
# 2. Replace YOUR_ORGANIZATION_HERE with your GitHub username or organization, whichever owns the repo you are publishing for
# 3. Create GitHub classic personal access token (https://github.com/settings/tokens) with scope write:packages
# 4. Create CirceCI context "nuget" and add two env vars
# 4a. GITHUB_PACKAGES_USERNAME: with your GitHub username (who created the personal access token)
# 4b. GITHUB_PACKAGES_TOKEN: with the personal access token secret created in step 3
@aokellermann
aokellermann / FirefoxDarkBackground.md
Created February 5, 2021 16:03
Dark background for Firefox about:* pages (blank, home, new tab).

Firefox Dark Background

  1. Go to about:config and set toolkit.legacyUserProfileCustomizations.stylesheets to true.
  2. Go to about:profiles and under Profile:default, click on Open Directory next to Root Directory.
  3. In the file browser that just opened, go to the chrome directory (or make it if it doesn't exist).
  4. Inside the chrome directory, create a file called userContent.css with the following code (#383c4a can be changed to the hex color you prefer):
@-moz-document 
url("about:blank"),
url("about:home"),
@aokellermann
aokellermann / fact.cpp
Created February 3, 2021 19:24
Constant time factorial in C++.
template <size_t S>
struct Factorial {
static constexpr size_t value = S * Factorial<S - 1>::value;
};
template <>
struct Factorial<0> {
static constexpr size_t value = 1;
};
/**
* @file intro.h
* @author Antony Kellermann
* @copyright 2020 Antony Kellermann
*/
#pragma once
#include <algorithm>
#include <cmath>
@aokellermann
aokellermann / singleton.h
Last active August 25, 2020 13:28
C++ implementation of Singleton supporting parameter pack construction.
/**
* @file singleton.h
* @author Antony Kellermann
* @copyright 2020 Antony Kellermann
*/
#pragma once
#include <memory>
#include <mutex>