- VScode files (they go in
.vscode/) [[1]] [[2]]:lauch.json: debugging configurations.taks.json: create task to build the C/C++ project.c_cpp_properties.json: settings related to IntelliSense.
.clang-format: rules for how your code should be formatted, such as indentation, line length, spacing, and so on. It is based on a predefined style to base the formatting on (in my case, I use the [Google style][3]).- Simple
Makefilefor a basic build system template. - Instructions to analyze a C/C++ code performance.
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
| val primes: Stream[Int] = 2 #:: Stream.from(3).filter { n => !primes.takeWhile(_ <= math.sqrt(n)).exists(n % _ == 0) } | |
| def isPrime(n: Int) = primes.dropWhile(_ < n).head == n |
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
| class Job(): | |
| def __init__(self, *args, **kwargs): | |
| pass | |
| def __call__(self, data): | |
| raise NotImplementedError() | |
| class Square(Job): | |
| def __call__(self, data): | |
| return [d * d for d in data] |
It turns out that MacOS Tahoe can generate and use secure-enclave backed SSH keys! This replaces projects like https://github.com/maxgoedjen/secretive
There is a shared library /usr/lib/ssh-keychain.dylib that traditionally has been used to add smartcard support
to ssh by implementing PKCS11Provider interface. However since recently it also implements SecurityKeyProivder
which supports loading keys directly from the secure enclave! SecurityKeyProvider is what is normally used to talk to FIDO2 devices (e.g. libfido2 can be used to talk to your Yubikey). However you can now use it to talk to your Secure Enclave instead!