- Basic syntax
- Flow Examples
- Advanced features
- Using with existing libraries (
flow-typedandlibdefs) - Tooling
- Try
| ;; Let's experiment with Clojure 1.8.0 running with a relatively small heap | |
| ;; of 10MB. To avoid any extra dependencies, we'll start it as follows: | |
| ;; | |
| ;; java -Xmx10m -jar clojure-1.8.0.jar | |
| ;; | |
| ;; Copy following expressions into your REPL one by one. | |
| ;; | |
| ;; Let's take a small number, for instance one million. | |
| (def small-num (* 1000 1000)) |
| tell application "Google Chrome" | |
| tell front window | |
| activate | |
| if URL of active tab is not equal to "chrome://newtab/" then | |
| make new tab at end of tabs | |
| end if | |
| end tell | |
| end tell |
Sometimes you may want to use a DNS server for specific domain requests and another DNS server for all other requests. This is helpful, for instance, when connected to a VPN. For hosts behind that VPN you want to use the VPN's DNS server but all other hosts you want to use Google's public DNS. This is called "DNS splitting."
Here, we run dnsmasq as a background service on macOS. The dnsmasq configuration described below implements DNS splitting.
brew install dnsmasq
Last updated March 13, 2024
This Gist explains how to sign commits using gpg in a step-by-step fashion. Previously, krypt.co was heavily mentioned, but I've only recently learned they were acquired by Akamai and no longer update their previous free products. Those mentions have been removed.
Additionally, 1Password now supports signing Git commits with SSH keys and makes it pretty easy-plus you can easily configure Git Tower to use it for both signing and ssh.
For using a GUI-based GIT tool such as Tower or Github Desktop, follow the steps here for signing your commits with GPG.
| import java.lang.ProcessBuilder.Redirect | |
| import java.util.concurrent.TimeUnit | |
| fun String.runCommand(workingDir: File? = null) { | |
| val process = ProcessBuilder(*split(" ").toTypedArray()) | |
| .directory(workingDir) | |
| .redirectOutput(Redirect.INHERIT) | |
| .redirectError(Redirect.INHERIT) | |
| .start() | |
| if (!process.waitFor(10, TimeUnit.SECONDS)) { |
Capturing video from the rpi camera with ffmpeg can vary from less than 5% to 100% of the CPU (rpi zero) depending on ffmpeg using the hardware acceleration or not.
On many github issues one finds the suggestion of using h264_omx codec to use the gpu - but it does not ship with the default ffmpeg on Raspbian.
Instead I found that one can use the v4l2 driver provided by raspbian to get hardware accelerated h264 output. Also setting the video size will save one from using a (cpu) scale filter.
capture h264 video from rpi camera
A quick guide on how to setup a GPU-Passthorugh. Below are some of my Resources
- https://wiki.archlinux.org/index.php/PCI_passthrough_via_OVMF
- https://www.evonide.com/non-root-gpu-passthrough-setup/
- https://dominicm.com/gpu-passthrough-qemu-arch-linux/
The Arch Wiki is the goto place for additional information and performance tweaks like CPU-Pinning.
- IGPU or second dedicated GPU for Host system (unless you want to go the hard way and use one GPU for HOST and GUEST)
| let cache = new Map(); | |
| let pending = new Map(); | |
| function fetchTextSync(url) { | |
| if (cache.has(url)) { | |
| return cache.get(url); | |
| } | |
| if (pending.has(url)) { | |
| throw pending.get(url); | |
| } |
| FROM alpine/git:1.0.4 | |
| CMD ["git", "version"] |