Similar to OpenSCAD.
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.15) | |
project(dump_partitions) | |
include(${CMAKE_CURRENT_SOURCE_DIR}/../cmake/CPM.cmake) | |
CPMAddPackage("gh:fmtlib/fmt#11.0.2") | |
CPMAddPackage("gh:p-ranav/argparse#v3.1") | |
file(WRITE "${CMAKE_BINARY_DIR}/cleanupxformdata.cmake" | |
[=[ | |
file(READ "${SOURCE}" TEXT) | |
string(REGEX REPLACE "\nmodule {\n" "\n" TEXT "${TEXT}") |
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
;; Python Black Formatter | |
;; package.el | |
(package! python-black) | |
;; config.el | |
(use-package! python-black | |
:demand t | |
:after python) | |
(add-hook! 'python-mode-hook #'python-black-on-save-mode) |
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
# Generate PDFs from the Markdown source files | |
# | |
# In order to use this makefile, you need some tools: | |
# - GNU make | |
# - Pandoc | |
# - LuaLaTeX | |
# - DejaVu Sans fonts | |
# Directory containing source (Markdown) files | |
source := src |
- Use
curl
to get the JSON response for the latest release - Use
grep
to find the line containing file URL - Use
cut
andtr
to extract the URL - Use
wget
to download it
curl -s https://api.github.com/repos/jgm/pandoc/releases/latest \
| grep "browser_download_url.*deb" \
| cut -d : -f 2,3 \
| tr -d \" \
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
winget install Microsoft.VisualStudio.Enterprise | |
winget install Microsoft.VisualStudioCode | |
winget install Microsoft.WindowsTerminalPreview | |
winget install Microsoft.PowerToys | |
winget install Git.Git | |
winget install Apple.iTunes | |
winget install ditto.ditto | |
winget install RandyRants.SharpKeys | |
winget install ScooterSoftware.BeyondCompare4 | |
winget install GitHub.cli |
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 python3 | |
import shlex | |
import shutil | |
import sys | |
import os | |
import os.path | |
from pathlib import Path | |
args = shlex.split(sys.argv[1]) | |
prog = Path(os.path.expanduser(str(args[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
function private_clone() { | |
sourceRepo=$2 | |
destOrg=$1 | |
repoName=$(echo $sourceRepo | cut -d/ -f 2) | |
destRepo=$(echo $destOrg/$repoName) | |
gh repo create -y --private $destRepo | |
git clone --bare [email protected]:$sourceRepo\.git | |
cd $repoName\.git | |
git push --mirror [email protected]:$destRepo | |
cd ..; rm -rf $repoName\.git; |
This cheat sheet describes my usage/implementation of virtualenv with virtualenv wrapper and the bash foo that I added with the help of many blogs to make it all tick together in fun land.
Quick Reference
$ echo $WORKON_HOME
/Users/benjamin/.virtualenvs
$ echo $PROJECT_HOME
NewerOlder