Skip to content

Instantly share code, notes, and snippets.

View CryptArchy's full-sized avatar

Christopher Andrews CryptArchy

View GitHub Profile
@GLMeece
GLMeece / latency_numbers.md
Last active February 22, 2025 10:46
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 - - -
@mtvee
mtvee / image2xp.py
Last active July 3, 2025 06:43
convert an image to REXPaint xp or ascii, with optional resize
#
# translate an image file into the REXPaint file format
# or plain ascii
#
# requires: python 3+
# requires: pip install Pillow
#
# source: https://gist.github.com/mtvee/5629a2caa34dbf3ece95
# ---------------------------------------------------------------------------------
import os
@grugq
grugq / gist:03167bed45e774551155
Last active October 13, 2025 19:09
operational pgp - draft

Operational PGP

This is a guide on how to email securely.

There are many guides on how to install and use PGP to encrypt email. This is not one of them. This is a guide on secure communication using email with PGP encryption. If you are not familiar with PGP, please read another guide first. If you are comfortable using PGP to encrypt and decrypt emails, this guide will raise your security to the next level.

@kocubinski
kocubinski / ConfigProvider.tt
Created May 3, 2013 20:10
T4 Text Template .ttinclude to find and parse app.config for a connection string.
<#@ Assembly Name="EnvDTE" #>
<#@ Assembly Name="System.Configuration.dll" #>
<#@ import namespace="System.Configuration" #>
<#@ import namespace="System.Text.RegularExpressions" #>
<#@ IntelliSenseLanguage processor="tangibleT4Editor" language="C#" #>
<#+
string GetConnectionString()
{
var host = (IServiceProvider)Host;
@kocubinski
kocubinski / DbEnum.tt
Created May 3, 2013 20:08
A T4 text template to generate a C# enum code from an external data source.
<#@ template debug="true" hostSpecific="true" #>
<#@ output extension=".cs" #>
<#@ Assembly Name="System.Core.dll" #>
<#@ Assembly Name="System.Xml.dll" #>
<#@ Assembly Name="System.Configuration.dll" #>
<#@ Assembly Name="System.Security.dll" #>
<#@ Assembly Name="System.Xml.Linq.dll" #>
<#@ Assembly Name="System.Data.dll" #>
<#@ Assembly Name="System.Configuration.dll" #>
<#@ import namespace="System" #>