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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>DVTConsoleDebuggerInputTextColor</key> | |
| <string>0.868401 0.868508 0.868328 1</string> | |
| <key>DVTConsoleDebuggerInputTextFont</key> | |
| <string>SFMono-Regular - 11.0</string> | |
| <key>DVTConsoleDebuggerOutputTextColor</key> | |
| <string>0.868401 0.868508 0.868328 1</string> |
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
| #ifndef KJ_SYNCHRONIZEDVALUE_H | |
| #define KJ_SYNCHRONIZEDVALUE_H | |
| /* | |
| Copyright 2025 Kristopher Johnson | |
| Permission is hereby granted, free of charge, to any person obtaining a copy of | |
| this software and associated documentation files (the “Software”), to deal in | |
| the Software without restriction, including without limitation the rights to | |
| use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of |
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 | |
| """ | |
| generate_cpp_project.py | |
| This script generates a standard C++ project structure with CMake build system. | |
| The generated project includes: | |
| - A main executable | |
| - A library with header files | |
| - Unit tests using Doctest | |
| - CMake configuration with CPack support |
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
| // Example of using the Stopwatch class to measure elapsed time. | |
| #include <iostream> | |
| #include <thread> | |
| #include "stopwatch.h" | |
| int main(int argc, const char **argv) { | |
| // Construct stopwatch starting at current time. | |
| Stopwatch stopwatch; |
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
| if type brew &>/dev/null; then | |
| if brew list llvm &>/dev/null; then | |
| alias clang-tidy="$(ls -1 $(brew --cellar llvm) | sort -V | tail -n 1 | xargs -I {} echo $(brew --cellar llvm)/{}/bin/clang-tidy)" | |
| fi | |
| fi |
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
| # Open the current directory's GitHub repo in web browser | |
| alias open-repo="open \"\$(git config --get remote.origin.url | sed -E 's/git@github.com:/https:\/\/github.com\//; s/\.git\$//')\"" |
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
| // Plays note with infinite sustain when pressed. | |
| // Unlatches note when it is pressed again. | |
| // Initialize an empty set to store latched notes | |
| var latchedNotes = new Set(); | |
| function HandleMIDI(event) { | |
| // Check if the event is a note on or note off | |
| if (event instanceof NoteOn) { | |
| if (latchedNotes.has(event.pitch)) { |
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 | |
| # Given a process ID, print time,%cpu,%mem,vsz,rss in CSV format once per minute. | |
| # Check if PID is provided | |
| if [ -z "$1" ]; then | |
| echo "Usage: $0 <PID>" | |
| exit 1 | |
| fi |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 | |
| """Tests/examples for the argparse module. | |
| Run "python3 argparsetest.py -h" for help. | |
| """ | |
| from argparse import ArgumentParser | |
| def main(): |
NewerOlder