Skip to content

Instantly share code, notes, and snippets.

View mwilsoncoding's full-sized avatar
💭
I may be slow to respond.

Max Wilson mwilsoncoding

💭
I may be slow to respond.
View GitHub Profile
@mwilsoncoding
mwilsoncoding / log.cpp.debug-patch
Last active November 10, 2020 18:32
Enable ustushi debug - patch made from: https://gitlab.com/utsushi/utsushi/-/issues/10
diff --git a/lib/log.cpp b/lib/log.cpp
index 9fa576e..0ae6107 100644
--- a/lib/log.cpp
+++ b/lib/log.cpp
@@ -26,8 +26,8 @@
namespace utsushi {
-log::priority log::threshold = log::FATAL;
-log::category log::matching = log::NOTHING;
@mwilsoncoding
mwilsoncoding / gist:f385364ceab7b9f2224faafdb1dc2ccf
Last active July 2, 2020 14:23
Version Control Aliases in 2020
# Git only
alias gi='git init -q; fle=$(mktemp -p .); git add .; git commit -am init &>/dev/null; rm $fle; git branch -m main; git commit -am main &>/dev/null; unset $fle;'
# Pijul only
alias pi='pijul init; pijul fork main; pijul prune master;'
# Git and Pijul
alias gi='git init -q; ! [ -d ./.pijul ] || { echo ".pijul/" >>.gitignore; echo ".git/" >>.pijulignore; git add .; git commit -am ".gitignore and .pijulignore" &>/dev/null; pijul add --recursive .; pijul record -am ".gitignore and .pijulignore" &>/dev/null; }; fle=$(mktemp -p .); git add .; git commit -am init &>/dev/null; rm $fle; git branch -m main; git commit -am main &>/dev/null; unset $fle;'
@mwilsoncoding
mwilsoncoding / 5_3
Last active December 15, 2019 15:42
{ config, pkgs, ... }:
let
linux_5_3_16_derivation = { stdenv, buildPackages, fetchurl, perl, buildLinux, modDirVersionArg ? null, ... } @ args:
with stdenv.lib;
buildLinux (args // rec {
version = "5.3.16";
# modDirVersion needs to be x.y.z, will automatically add .0 if needed
modDirVersion = if (modDirVersionArg == null) then concatStrings (intersperse "." (take 3 (splitString "." "${version}.0"))) else modDirVersionArg;

Nix Tidbits

In which tidbits regarding nix can be found...

Nix

Inherit

# introduces the 'hi' attribute to the following scope
# only valid inside a let block
nix-repl> let inherit ({greeting = "helloworld";}) greeting; in greeting
"helloworld"

Keybase proof

I hereby claim:

To claim this, I am signing this object: