Inspired by The MIT CSAIL course by the same name.
- CLI intutition
--version(-V)--verbose(-v)- Command-line flag conventions
- Dashes
- short vs long flags
| #!/usr/bin/env python3 | |
| # https://www.reddit.com/r/riddles/comments/9sdy1y/a_hunter_and_a_rabbit_please_help_me_find_the/?utm_source=reddit-android | |
| from bitstring import BitArray | |
| import collections | |
| class State(object): | |
| def __init__(self, n, data): | |
| self.data = data |
| # Project-specific | |
| # location to create for binaries | |
| BUILD_DIR := build | |
| # location of source code | |
| SOURCE_DIR := source | |
| # name of main executable in $(SOURCE_DIR) without .c | |
| EXECUTABLE := main | |
| # Space-separated pkg-config libraries used by this project | |
| LIBS := gmp gmpxx | |
| # source ext. Some people use .cxx, .cc, .cpp |
| import click | |
| import re | |
| import io | |
| import contextlib | |
| #import colorama | |
| #from termcolor import cprint | |
| ''' | |
| # Overview # |
| #!/usr/bin/env ruby | |
| # For configured directories, this script syncs them with the remote, | |
| # runs a command, and then downloads the result. | |
| # | |
| ## Motivation ## | |
| # | |
| # I am working on a project whose files are stored remotely. I would | |
| # like to use my extensively curated and configured tools (zsh, emacs, | |
| # tmux, ripgrep), but I need to run some commands on the remote. I |
| #!/bin/sh | |
| set -e -x | |
| ############################################################################### | |
| # About | |
| ############################################################################### | |
| # This script automates many common tasks I need to do using docker, | |
| # such as emulating the current user in the container. Some of these | |
| # tasks require changes at build-time, run-time, or both, so this |
| #define C_AND_POSIX_SHELL_POLYGLOT /* | |
| # This section gets interpreted by the POSIX shell. | |
| # It is inside a C comment, so it gets ignored by the C compiler. | |
| CFLAGS= | |
| NIXPKGS= | |
| TARGET=/tmp/a.out | |
| exec nix-shell \ | |
| --pure \ |
Inspired by The MIT CSAIL course by the same name.
--version (-V)--verbose (-v)| import textwrap | |
| import subprocess | |
| import json | |
| from pathlib import Path | |
| ## Configuration ## | |
| # All langs except real_langs will be ignored | |
| only_include_langs = {"C++", "C", "C Header", "C++ Header", "YAML", "Makefile", "Markdown", "Shell", "CMake", "Python", "Dockerfile"} |
| SPDX Identifier | Trove Classifier | |
|---|---|---|
| AFL-1.1 | License :: OSI Approved :: Academic Free License (AFL) | |
| AFL-1.2 | License :: OSI Approved :: Academic Free License (AFL) | |
| AFL-2.0 | License :: OSI Approved :: Academic Free License (AFL) | |
| AFL-2.1 | License :: OSI Approved :: Academic Free License (AFL) | |
| AFL-3.0 | License :: OSI Approved :: Academic Free License (AFL) | |
| Apache-1.1 | License :: OSI Approved :: Apache Software License | |
| Apache-1.2 | License :: OSI Approved :: Apache Software License | |
| Apache-2.0 | License :: OSI Approved :: Apache Software License | |
| APSL-1.0 | License :: OSI Approved :: Apple Public Source License |