Skip to content

Instantly share code, notes, and snippets.

View jennings's full-sized avatar
🦄
What a mess I've made

Stephen Jennings jennings

🦄
What a mess I've made
View GitHub Profile
@jennings
jennings / gist:9fe1432f394fc18a7eb0c2b2eab8dad3
Created August 23, 2024 20:55
Code reviews should have a single commit
When reviewing code, you should strive to review a single commit per review.
# How do I review a single commit?
If you are using pull requests, the branch you're reviewing should only have one commit to merge into the target branch.
# How do I address review feedback if I can only have one commit in my branch?
Make your changes and _amend_ the commit, then force push with `git push -f`.
@jennings
jennings / FirefoxColorSettings.md
Last active August 13, 2024 15:40
Firefox Color settings

Switching to Jujutsu workflows

When coming to Jujutsu, one may try to emulate their Git workflows directly. This is possible, but can cause a lot of difficulty.

This guide shows how to translate Git workflows to Jujutsu.

Getting started

Cloning an existing repository

@jennings
jennings / Makefile
Last active January 10, 2023 17:40
Run Azurite over HTTPS with a trusted certificate
# Makefile for running Azurite with or without HTTPS. Requires the
# mkcert and azurite commands to be available.
#
# Usage:
# make - Run Azurite with HTTPS
# make https - Run Azurite with HTTPS
# make http - Run Azurite with HTTP
# make install - Create certificates using mkcert (runs automatically)
# make reset - Clear the Azurite database
var ParseError = from _ in Parse.String("error") select Level.Error;
var ParseWarning = from _ in Parse.String("warning") select Level.Warning;
var ParseLevel = ParseError.Or(ParseWarning);
var ParsePosition =
from lp in Parse.String("(")
from line in Parse.Number
from comma in Parse.String(", ")
from column in Parse.Number
from rp in Parse.String(")")
select new Position
@jennings
jennings / README.md
Created June 16, 2022 15:58
Kdiff3 line ending bug
@jennings
jennings / ForeignKey_Option1.cs
Last active December 2, 2021 22:00
ForeignKey and InverseProperty placements for Entity Framework Core
public class Person
{
public int Id { get; set; }
public List<Book> AuthoredBooks { get; set; }
public List<Book> EditedBooks { get; set; }
}
public class Book
{
public int Id { get; set; }
@jennings
jennings / Makefile
Created May 14, 2021 16:55
Makefile syntax to run different commands on Windows. Works with GNU Make, not NMake
target:
ifeq ($(OS),Windows_NT)
powershell -NoProfile -Command "Get-Date"
else
date
endif
@jennings
jennings / File0.txt
Last active July 29, 2022 16:32
Testing the order that gists sort files. It seems to be first case-insensitively, then case-sensitively. And the title is the first file in ASCII order.
a
using System;
using System.Threading.Tasks;
using MassTransit;
namespace mttest
{
class Program
{
static async Task Main(string[] args)
{