Skip to content

Instantly share code, notes, and snippets.

@Jayman2000
Jayman2000 / line-ending-ratios.sh
Created April 21, 2024 11:13
Determine how many files in a repo use LF/CRLF line endings.
#!/usr/bin/env bash
# SPDX-FileNotice: πŸ…­πŸ„1.0 This file is dedicated to the public domain using the CC0 1.0 Universal Public Domain Dedication <https://creativecommons.org/publicdomain/zero/1.0/>.
# SPDX-FileContributor: Jason Yundt <[email protected]> (2024)
set -o errexit -o nounset -o pipefail
file_listing="$(git ls-files --eol)"
function echo_file_listing {
printf "%s\n" "$file_listing"
}
@Jayman2000
Jayman2000 / openenclave build log.txt
Created March 14, 2024 19:08
A log used to report an issue with a Nixpkgs PR: <https://github.com/NixOS/nixpkgs/pull/129388>
these 2 paths will be fetched (0.11 MiB download, 0.62 MiB unpacked):
/nix/store/xcx9prry5zc1ya5qpzdss3pkp03a32z4-nixpkgs-review-2.10.3
/nix/store/vjsnpg4awfwgwsp99zlcpsjpasn69lvq-python3.11-argcomplete-3.1.6
copying path '/nix/store/vjsnpg4awfwgwsp99zlcpsjpasn69lvq-python3.11-argcomplete-3.1.6' from 'https://cache.nixos.org'...
copying path '/nix/store/xcx9prry5zc1ya5qpzdss3pkp03a32z4-nixpkgs-review-2.10.3' from 'https://cache.nixos.org'...
$ git -c fetch.prune=false fetch --no-tags --force https://github.com/NixOS/nixpkgs master:refs/nixpkgs-review/0 pull/129388/head:refs/nixpkgs-review/1
remote: Enumerating objects: 28, done.
remote: Counting objects: 100% (24/24), done.
remote: Compressing objects: 100% (11/11), done.
remote: Total 28 (delta 13), reused 17 (delta 13), pack-reused 4
@nix { "action": "setPhase", "phase": "unpackPhase" }
Running phase: unpackPhase
unpacking source archive /nix/store/47b4cqhk9waii1yx3y8wapklzzwld1m2-vhba-module-20211218.tar.xz
source root is vhba-module-20211218
setting SOURCE_DATE_EPOCH to timestamp 1639826332 of file vhba-module-20211218/vhba.c
@nix { "action": "setPhase", "phase": "patchPhase" }
Running phase: patchPhase
@nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" }
Running phase: updateAutotoolsGnuConfigScriptsPhase
@nix { "action": "setPhase", "phase": "configurePhase" }
@Jayman2000
Jayman2000 / default.nix
Last active February 15, 2024 19:45
Nix expressions that will help me test out a Disko PR: <https://github.com/nix-community/disko/>
# πŸ…­πŸ„1.0 This file is dedicated to the public domain using the CC0 1.0 Universal
# Public Domain Dedication:
# <https://creativecommons.org/publicdomain/zero/1.0/>
{ diskoDir }:
let
configuration = { pkgs, modulesPath, ... }: {
imports = [ "${modulesPath}/installer/cd-dvd/installation-cd-minimal.nix" ];
# This will (hopefully) make the ISO build faster.
isoImage.squashfsCompression = "lz4";
@Jayman2000
Jayman2000 / update_files_for_new_version_of_godot.gd
Created December 13, 2023 21:27
Force a new version of Godot 3 to make any automatic changes that it’s going to make.
# πŸ…­πŸ„1.0 This file is dedicated to the public domain using the CC0 1.0 Universal
# Public Domain Dedication <https://creativecommons.org/publicdomain/zero/1.0/>.
tool
extends EditorScript
signal finished_updating_scene_files
# If this was Godot 4, I would probably just use the built-in Callable type
This file has been truncated, but you can view the full file.
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking sources
unpacking source archive /nix/store/x5k3x9xggcxzspn12cvg68wmqaxyr125-SDL-2.548.tar.gz
source root is SDL-2.548
setting SOURCE_DATE_EPOCH to timestamp 1526727352 of file SDL-2.548/typemap
@nix { "action": "setPhase", "phase": "patchPhase" }
patching sources
@nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" }
updateAutotoolsGnuConfigScriptsPhase
@nix { "action": "setPhase", "phase": "configurePhase" }
@Jayman2000
Jayman2000 / generate-flatpak-test.sh
Last active September 7, 2023 00:06
A script used to help test a resholve PR: <https://github.com/abathur/resholve/pull/104>
#!/usr/bin/env nix-shell
#! nix-shell -i bash -p coreutils
# πŸ…­πŸ„1.0 This file is dedicated to the public domain using the CC0 1.0 Universal
# Public Domain Dedication <https://creativecommons.org/publicdomain/zero/1.0/>.
set -e
readonly flatpak_args=(
-h --help
--version
--default-arch
@Jayman2000
Jayman2000 / generate-msmtp-test.sh
Last active September 11, 2023 16:09
A script used to help test a resholve PR: <https://github.com/abathur/resholve/pull/103>
#!/usr/bin/env bash
# πŸ…­πŸ„1.0 This file is dedicated to the public domain using the CC0 1.0 Universal
# Public Domain Dedication <https://creativecommons.org/publicdomain/zero/1.0/>.
set -u
# Note: none of these variables should contain whitespace.
readonly file=/dev/null
readonly domain=jasonyundt.email
readonly name=foo
readonly email="$name@$domain"
@Jayman2000
Jayman2000 / ez-resholve.sh
Last active September 22, 2023 13:06
A script to make it easier to use Git versions of resholve and binlore (<https://github.com/abathur/resholve> and <https://github.com/abathur/binlore>).
#!/usr/bin/env nix-shell
#! nix-shell -i bash -p nix -p coreutils -p bash
# πŸ…­πŸ„1.0 This file is dedicated to the public domain using the CC0 1.0 Universal
# Public Domain Dedication <https://creativecommons.org/publicdomain/zero/1.0/>.
set -ue
function package_to_bin_dir
{
package="$*"
@Jayman2000
Jayman2000 / make update.txt
Last active September 5, 2023 17:28
A log used to report an issue with resholve: <https://github.com/abathur/resholve/issues/99>
$ make update
Sassing docs/manpage.css from docs/manpage.scss
Building manpage
Sassing docs/strings.css from docs/strings.scss
Wursting _resholve/strings.py from docs/strings.wwst
touch .local
Building ci.nix
these 19 derivations will be built:
/nix/store/chkvwixk9fh507xz1c4vdziqhc6839r8-testmod1-unresholved-unreleased.drv
/nix/store/62mcj11zmbig7mb8n1g4b17jkdw2vfw6-testmod1-unresholved-unreleased-binlore.drv