Use this as a setup.cfg template: https://github.com/mcejp/goeieDAG/blob/master/setup.cfg (grab also the pyproject.toml)
TODO: Migrate to using pyproject.toml only
TODO: Remove VERSION
constant (see pallets/flask#5230)
// Background: https://www.snellman.net/blog/archive/2016-12-13-ring-buffers/ | |
// Variant with indices modulo 2*capacity as suggested by dizzy57 and Aristotle Pagaltzis | |
size_t read; | |
size_t write; | |
mask(val) { return val % array.capacity; } | |
wrap(val) { return val % (array.capacity * 2); } | |
inc(index) { return wrap(index + 1); } | |
push(val) { assert(!full()); array[mask(write)] = val; write = inc(write); } |
macro(cmake_path_ABSOLUTE_PATH VARIABLE_NAME) | |
if (${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.20.0") | |
cmake_path(ABSOLUTE_PATH ${VARIABLE_NAME}) | |
else() | |
# polyfill for CMake < 3.20 | |
get_filename_component(${VARIABLE_NAME} ${${VARIABLE_NAME}} ABSOLUTE) | |
endif() | |
endmacro() | |
function(my_build_step SOURCE OUTPUT) |
<!doctype html> | |
<html> | |
<head> | |
<style> | |
html { | |
font-size: 1.2em; | |
} | |
body { |
Use this as a setup.cfg template: https://github.com/mcejp/goeieDAG/blob/master/setup.cfg (grab also the pyproject.toml)
TODO: Migrate to using pyproject.toml only
TODO: Remove VERSION
constant (see pallets/flask#5230)
.macro saveregister | |
// Registers are saved in the following order (see also: user_regs_struct): | |
// x0 x1 ... x28 x29 x30 SP PC PSTATE | |
// at: -110 -108 ... -30 -28 -20 -18 -10 -08 (hex) with respect to SP-at-entry | |
// Start by saving these: | |
// [sp, #-0x40] <== x26; x27 | |
// [sp, #-0x30] <== x28; x29 | |
stp x26, x27, [sp, #-0x40] | |
stp x28, x29, [sp, #-0x30] |
/* Copyright (c) 2005-2007, Google Inc. | |
* All rights reserved. | |
* | |
* Redistribution and use in source and binary forms, with or without | |
* modification, are permitted provided that the following conditions are | |
* met: | |
* | |
* * Redistributions of source code must retain the above copyright | |
* notice, this list of conditions and the following disclaimer. | |
* * Redistributions in binary form must reproduce the above |
#!/bin/sh | |
set -ex | |
podman start -ia jekyll || podman run -it \ | |
--name jekyll \ | |
--volume=$PWD:/srv/jekyll \ | |
--env JEKYLL_ENV=production \ | |
--env JEKYLL_ROOTLESS=1 \ | |
-p 4000:4000 \ | |
docker.io/jekyll/jekyll:4.1.0 \ |
#!/bin/bash | |
if [[ $# -ne 1 ]] ; then | |
echo 'usage: make_release.sh RELEASE' | |
echo ' example: ./make-release.sh 2022.06' | |
exit 1 | |
fi | |
set -e |
class LineWriter: | |
def __init__(self, f, indent=0): | |
self._f = f | |
self._indent = indent | |
def indented(self) -> "LineSink": | |
return LineSink(self._f, self._indent + 1) | |
def write_line(self, s=None): | |
if s is not None: |
# Adapted from original: | |
# https://jonathanhamberg.com/post/cmake-file-embedding/ | |
# https://gitlab.com/jhamberg/cmake-examples/-/blob/master/cmake/FileEmbed.cmake | |
function(FileEmbed_Add input output c_name) | |
add_custom_command( | |
OUTPUT ${output} | |
COMMAND ${CMAKE_COMMAND} | |
-DRUN_FILE_EMBED_GENERATE=1 | |
-DINPUT_FILE=${input} |