This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env cmake -P | |
cmake_minimum_required(VERSION 2.8) | |
# This results in this output: | |
# -- ======================== | |
# -- empty_var: "" | |
# -- ------- | |
# -- Unquoted parsing: print_args() | |
# -- ARGC: 0 | |
# -- ------- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set(mylist | |
"first item" | |
"second-item" | |
) | |
message("mylist: ${mylist}") | |
# mylist: first item;second-item | |
separate_arguments(mylist_sep WINDOWS_COMMAND "${mylist}") | |
message("mylist_sep: ${mylist_sep}") | |
# mylist_sep: first;item\;second-item |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake_minimum_required(VERSION 3.12.0) | |
enable_testing() | |
if (${CMAKE_SYSTEM_NAME} MATCHES "Windows") | |
set(IS_WINDOWS TRUE) | |
elseif (${CMAKE_SYSTEM_NAME} MATCHES "Linux") | |
set(IS_LINUX TRUE) | |
elseif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") | |
set(IS_MACOSX TRUE) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
mkdir ancestry_path_test | |
cd ancestry_path_test | |
git init | |
git checkout -b root | |
echo "R1" > root_file |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Set-StrictMode -Version 1.0 | |
$THIS_FILE = [System.IO.FileInfo]$MyInvocation.MyCommand.Path | |
$THIS_DIR = $THIS_FILE.Directory | |
Write-Host $THIS_DIR | |
$TEST_ROOT = "${THIS_DIR}\test_root" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
set -u | |
# install rust | |
if ! which cargo >/dev/null 2>&1 ; then | |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# uv_install by Paul Molodowitch is marked CC0 1.0. | |
# to view a copy of this mark, visit https://creativecommons.org/publicdomain/zero/1.0/ | |
"""Installs the uv tool in a .uv subdirectory of this folder""" | |
import argparse | |
import enum | |
import inspect |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# prune_git_branches_on_remote by Paul Molodowitch is marked CC0 1.0. | |
# to view a copy of this mark, visit https://creativecommons.org/publicdomain/zero/1.0/ | |
"""CLI interface to prune git branches from a target repo that match the reference repo.""" | |
import argparse | |
import subprocess | |
import sys |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# try_decode by Paul Molodowitch is marked CC0 1.0. | |
# to view a copy of this mark, visit https://creativecommons.org/publicdomain/zero/1.0/ | |
import locale | |
import sys | |
_TEST_CODECS: tuple[str, ...] = () | |
def get_test_codecs(): | |
global _TEST_CODECS # pylint: disable=global-statement |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# better_zipfile by Paul Molodowitch is marked CC0 1.0. | |
# to view a copy of this mark, visit https://creativecommons.org/publicdomain/zero/1.0/ | |
import sys | |
import zipfile | |
import stat | |
import os | |
OlderNewer