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 bash | |
| # Exit on error, undefined variables, and pipe failures | |
| set -eup | |
| POSTGRES_VERSION="18.0" | |
| ARCHIVE_NAME="postgresql-${POSTGRES_VERSION}.tar.gz" | |
| EXTRACT_DIR="postgresql-${POSTGRES_VERSION}" | |
| # Skip download if archive already exists |
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 -eux | |
| # This script builds a static version of poppler and its dependencies. | |
| # The script is based on the instructions and examples provided in the article: | |
| # https://fasterthanli.me/series/dont-shell-out/part-3 | |
| # Get the absolute path of the script. | |
| SCRIPT_PATH=$(readlink -f "$0") | |
| # Get the directory where the script is located. |
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
| # Install comprehensive firmware packages | |
| sudo pacman -S linux-firmware-marvell linux-firmware-qlogic linux-firmware-liquidio linux-firmware-bnx2x | |
| # For the console font warning | |
| sudo pacman -S terminus-font | |
| # Optional: Install AUR firmware packages for more complete coverage | |
| yay -S wd719x-firmware upd72020x-fw |
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
| { | |
| "C++ Header Guard with extern C": { | |
| "prefix": "guard", | |
| "body": [ | |
| "#ifndef ${1:${TM_FILENAME_BASE/(.*)/${1:/upcase}_H/}}", | |
| "#define ${1:${TM_FILENAME_BASE/(.*)/${1:/upcase}_H/}}", | |
| "", | |
| "#ifdef __cplusplus", | |
| "extern \"C\" {", | |
| "#endif", |
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 | |
| # | |
| # git-semver: A utility for managing semantic versioning with Git tags | |
| # | |
| # Installation: | |
| # 1. Save this file as 'git-semver' in a directory in your PATH (e.g., /usr/local/bin/) | |
| # 2. Make it executable: chmod +x /path/to/git-semver | |
| # 3. Use it as a Git subcommand: git semver <command> | |
| # |
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 bash | |
| # Generate a self-signed certificate for specified hosts | |
| # and add it to the system keychain. | |
| # Requires: openssl, sudo | |
| set -euo pipefail | |
| # Configuration |
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
| InlayHints: | |
| ParameterNames: No | |
| DeducedTypes: No | |
| Diagnostics: | |
| UnusedIncludes: Strict | |
| ClangTidy: | |
| Add: [bugprone-*, cert-*, modernize-*, performance-*] | |
| Remove: [bugprone-easily-swappable-parameters, modernize-use-trailing-return-type, cert-err33-c, cert-err34-c] |
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
Show hidden characters
| { | |
| "main": { | |
| "scope": "c,c++", | |
| "prefix": "main", | |
| "body": [ | |
| "#include <stdio.h>", | |
| "", | |
| "int main(int argc, char*argv[]) {", | |
| "\t$0", | |
| "\treturn 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
| //#include "stdafx.h" | |
| #include <sodium.h> | |
| #include <iostream> | |
| using namespace std; | |
| #define MESSAGE (const unsigned char *) "test" | |
| #define MESSAGE_LEN 4 | |
| #define CIPHERTEXT_LEN (crypto_box_SEALBYTES + MESSAGE_LEN) |
NewerOlder