When only a subdirectory of a Git repository is opened in Visual Studio Code, repo-root Copilot customizations like
.github/copilot-instructions.md
are not discovered by default.
This can make Copilot ignore repository-wide instructions even though they exist at the top of the current Git repository.
Visual Studio Code has a built-in configuration items to resolve this issue by enabling
parent repository discovery
for chat customizations.
With this setting enabled true, VS Code walks upward from the opened workspace folder until it finds .git.
It then discovers chat customizations between the opened folder and the repository root, including:
.github/copilot-instructions.md
.github/instructions/*.instructions.md
prompt files
agent files such as AGENTS.md
hooks and other chat customizations
This setting is especially useful for monorepos and for workflows that open a focused subdirectory such as content/posts/, src/, or packages/frontend/ instead of the full repository root.
Without parent repository discovery, Copilot can miss repository-specific style and validation rules.
A few conditions apply:
the opened folder must not itself be a separate Git repository (e.g. Git submodule)
a parent folder must contain .git
the parent repository folder must be trusted in VS Code
To verify that the repository instructions are in use, inspect the References list on a Copilot Chat response.
If parent discovery is working, the response references typically include the repo-root customization files.
A Linux computer temp folder can be purged on schedule to free up disk space and remove old temporary files.
The programs “tmpwatch” or “tmpreaper” can be used to purge the temp folder on a schedule.
tmpwatch
is available on Red Hat-based Linux distributions, while
tmpreaper
is available on Debian-based Linux distributions.
To do a “dry run” of the purge command to see what files would be deleted, use the “–test” flag:
<tmpwatch|tmpreaper> --test --mtime 7d /tmp
Set the temp path explicitly, especially on HPC systems where scratch space may be under system-specific paths.
To remove duplicate entries in shell history for pressing “up” on repeated commands to give the last non-duplicated command, set for the respective shell as follows.
Bash: “~/.bashrc”: ignore duplicate lines, and omits lines that start with space.
Measuring the peak RAM usage of a process and all its children can be done using various tools and techniques.
OS-dependent tools may be the most accurate, but they can be complex to use.
A simpler approach is to periodically sample the RAM usage of the process and its children, like this scripts for Linux and macOS using
ps.
It is also possible though less accurate on macOS or Linux to use
/usr/bin/time,
but this only measures the peak RAM usage of the largest child process, not the total of all children, so this is unsuitable for multiprocess applications like “mpiexec”.
For Linux, a more accurate method is the Cgroup v2, such as implemented by
cgmemtime.
For macOS, the Instruments tool can be used to measure the RAM usage of a process and its children, but it requires a ‘codesign’d application and is more complex to set up.
xcrun xctrace record --template "Game Memory" --launch -- /path/to/application --output bench_game.trace --time-limit 30s
open bench_game.trace
CMake
cmake_language(TRACE)
enables tracing selected nestable portions of CMake script, which is important for debugging CMake projects due to the generally large volume of trace output.
The trace output is large as the nature of CMake’s platform-independence means that numerous checks are performed even on minimal CMake scripts.
This can make it difficult to find the relevant portion of the trace output for debugging.
The cmake_language(TRACE) command allows specification of a named portion of the CMake script to trace, including nested trace regions.
This is a powerful debugging tool because it narrows trace output to the relevant part of the CMake script instead of emitting the entire script trace.
To trace only part of a script, wrap that region with cmake_language(TRACE) as in this CMakeLists.txt example:
observe that only the trace output for the find_package(Zlib) command is emitted, while the find_package(LAPACK) command and compiler discovery are not traced.
grep is a ubiquitous command-line tool for searching plain-text data sets for lines that match a regular expression.
Ripgrep
is a modern alternative to grep that is designed to be faster and more efficient at recursive text file searches common to code developers.
Ripgrep is used internally by
VS Code
for its search functionality.
Install ripgrep with:
Windows: winget install BurntSushi.ripgrep.GNU
macOS: brew install ripgrep
Linux: apt install ripgrep or similar
The rg command is used to invoke ripgrep, and it supports a wide range of options for customizing search behavior.
Examples:
Search for the term “TODO” in all .cpp files in the current directory and its subdirectories:
rg "TODO" --glob "*.cpp"
Case-insensitive search:
rg -i todo
Show line numbers and filename only:
rg -n TODO
Search only certain file types:
rg TODO -g "*.cpp" -g "*.hpp"
Include hidden and ignored files (like .gitignore):
Valgrind
is a dynamic analysis tool that can detect memory leaks and other problems in programs including C, C++, and Fortran.
Valgrind is available on Linux and BSD for x86 and ARM CPU architectures.
For macOS on Intel x86 CPUs, Valgrind is available in
Homebrew.
For macOS on Apple Silicon ARM64 CPU, Valgrind can be used from an aarch64
Linux virtual machine
in native mode for best performance.
There is a development
fork
of Valgrind for Apple Silicon, but it may not yet ready for production use.
Weather radio broadcast alerts (USA NOAA NWR) are receivable on dedicated 162 MHz weather (WX) radio receivers.
Many two-way communications radios such as CB radio, GMRS, and MURS can also have 162 MHz WX radio receiver capability.
The advantage of these alerts is that mobile phone service is not required, just a small portable radio and a clear path to the WX radio transmitter, so audio alerts are heard only when a selected hazard type is determined to be in the area.
162 MHz WX radio is a one-way broadcast radio service carrying weather information and emergency alerts across much of the USA and
Mexico.
Unfortunately, the Canada WX radio service was
shutdown in March 2026.
Currently, Canadian weather broadcasts use the Coast Guard
Continuous Marine Broadcast
to relay weather information.
When determining which WX channel to receive on, it can be confusing because there is no standard WX channel number to 162 MHz frequency mapping.
Use the NOAA
USA search
to find nearby WX radio transmitter frequencies.
WX radio channel number to frequency mapping: a common practice is to start with the lowest frequency and go up across the 7 WX radio frequencies.
This is perhaps the most common channel number to frequency mapping.
WX Channel
Frequency (MHz)
1
162.400
2
162.425
3
162.450
4
162.475
5
162.500
6
162.525
7
162.550
Non-sequential channel order is used by some CB radios such as Radioddity / Anytone radios made by Qixiang.
WX Channel
Frequency (MHz)
1
162.550
2
162.400
3
162.475
4
162.425
5
162.450
6
162.500
7
162.525
Comparing reception performance on a known frequency vs. a handheld radio can give a quick indication that an antenna system is working OK, even if, as with 27 MHz CB radio, the designed antenna frequency is far from the 162 MHz weather radio frequency.
Comparing WX radio reception on a CB radio with base or mobile antenna versus a handheld radio on the same 162 MHz WX radio frequency indicates that the CB radio antenna coax is perhaps not severely damaged or lossy, and the radio is working OK.
Modern receivers may allow arbitrary VFO tuning.
This is important in Canada, where marine weather broadcasts are not always on WX radio frequencies.
On macOS, when started from the Applications icon, Matlab does NOT source shell configuration files.
Any environment variables set in these files such as those added by package managers like Homebrew or Conda will not be available in the Matlab environment.
On macOS, only if Matlab is started from the Terminal like /Applications/MatlabR20*.app/bin/matlab will Matlab source the shell configuration file, leading to the expected environment variables as default in an interactive login shell also available in Matlab.
Instead of depending on how the user launched Matlab, a more uniform approach is to have users set environment variables in the Matlab startup.m script, which will be sourced regardless of how Matlab is launched.
Set desired environment variables in the Matlab startup.m script like: