Reference: https://github.com/ggml-org/whisper.cpp/blob/master/README.md
In .zshrc
, add:
export DYLD_LIBRARY_PATH="/usr/local/lib:${DYLD_LIBRARY_PATH}"
/* | |
* A C implementation that mimics Perl's 'chomp' functionality. | |
* Reads from standard input and outputs all characters except the trailing newline. | |
* Preserves internal newlines but removes only the final newline if present. | |
* Compile with: gcc -O2 -o chomp chomp.c | |
*/ | |
#include <stdio.h> | |
int main(void) { |
Reference: https://github.com/ggml-org/whisper.cpp/blob/master/README.md
In .zshrc
, add:
export DYLD_LIBRARY_PATH="/usr/local/lib:${DYLD_LIBRARY_PATH}"
#!/bin/bash | |
# https-server | |
# 2025-04-30 | |
# | |
# This script starts a one-off HTTPS server using OpenSSL. | |
# It generates a temporary self-signed SSL certificate and private key, | |
# then uses OpenSSL's s_server command to serve files from the current directory | |
# over an encrypted HTTPS connection on port 4443. | |
# | |
# The script also handles cleanup: |
# python logging for AWS Lambda function | |
import logging | |
# boto3 internally uses DEBUG and INFO; therefore start with WARNING level | |
logging.basicConfig(level=logging.WARNING) | |
def lambda_handler(event, context): | |
logging.warning(f"{event=}") |
Open SingleFile
extension preferences...
For the File Name
field use this:
SingleFile/%if-empty<%replace<{page-title}| |_>|no_title>--{year-locale}{month-locale}{day-locale}.{hours-locale}{minutes-locale}{seconds-locale}.{filename-extension}
Example file (uses local time):
# to be placed in .zshrc or .bashrc on MacOS | |
function batt-info() { | |
echo | |
system_profiler SPPowerDataType | grep Wattage | cut -c 7- | |
echo | |
pmset -g batt | |
} |
This Python utility provides two functions for inserting lines into configuration files:
insert_lines
regex_insert_lines
These functions allow for precise and flexible modification of text files, particularly useful for updating configuration files in networking and system administration tasks.
insert_lines
: Inserts specified lines into a file before or after a line that starts with a given string.Inspired by: Add Git Branch Name to Terminal Prompt
I have a two line zsh prompt:
[git branch]
HH:MM:SS
$In my .zshrc
file: