把 Caps Lock 變成智慧的 Control 以及 Escape :
- 單獨輕按一下就是 Escape 。
- 若按下時同時按著其他鍵,就會是 Control 。
這應該是 Vim 和 Emacs 的最佳解了!(Emacs? Bash 的快捷鍵就是 Emacs 系列的)
- Send Escape if you tap Caps Lock alone.
This post also appears on lisper.in.
Reader macros are perhaps not as famous as ordinary macros. While macros are a great way to create your own DSL, reader macros provide even greater flexibility by allowing you to create entirely new syntax on top of Lisp.
Paul Graham explains them very well in [On Lisp][] (Chapter 17, Read-Macros):
The three big moments in a Lisp expression's life are read-time, compile-time, and runtime. Functions are in control at runtime. Macros give us a chance to perform transformations on programs at compile-time. ...read-macros... do their work at read-time.
You can use ffmpeg to directly pull frames off of a dahua 4300s at full resolution. May be a good alternative to pricey dvrs which likely cannot record at full resolution, may not work with the camera, or are prohibitevly expensive
Simple stream to file. Full resolution
ffmpeg -loglevel debug -rtsp_transport tcp -i "rtsp://admin:admin@198.175.207.61:554/live" \
-c copy -map 0 foo.mp4
(updated versions of this document, plus more, live here)
This will show you how to get Guix running on WSL2.
We're going to go as "minimal" as possible, without starting off one of the readily available WSL2 distros.
Parts of this guide should help with understanding how to set up any custom distro on WSL, not just Guix.
Disclaimer: I'm a Guix nOOb! (hence going through the trouble of installing it on WSL2)
Mosh (mobile shell) is a gift from the Gods(tm). Anyone with spotty internet or wireless connection has suffered the pain of a lost SSH session. Sure, one can fire up screen
(or tmux
as the kids are using these days), but that's an extra step and you are still using the SSH protocol.
I'm not here to tout the benefits of Mosh, you came here to open it up in your firewall.
/etc/firewalld/services/mosh.xml
firewall-cmd --add-service=mosh --permanent
firewall-cmd --reload
If you tend to have a lot of sessions (not recommended), you can increase the ports, but the default should be fine for most applications.
package indy; | |
import java.lang.invoke.CallSite; | |
import java.lang.invoke.ConstantCallSite; | |
import java.lang.invoke.MethodHandle; | |
import java.lang.invoke.MethodHandles; | |
import java.lang.invoke.MethodType; | |
import java.lang.reflect.Constructor; | |
import org.objectweb.asm.ClassWriter; |
PREFIX=$HOME | |
VERSION=1.2.3-ltb | |
# Install Protocol Buffers | |
wget http://protobuf.googlecode.com/files/protobuf-2.4.1.tar.bz2 | |
tar -xf protobuf-2.4.1.tar.bz2 | |
cd protobuf-2.4.1 | |
./configure --prefix=$PREFIX | |
make | |
make install |
;;; -*- Syntax: ANSI-Common-Lisp; Package: CL-USER -*- | |
;;; Author: Rainer Joswig, joswig@lisp.de, 2022 | |
;;; This code is written in portable Common Lisp. | |
; https://adventofcode.com/2022/day/10 | |
;; This solution makes use of multiple dispatch and standard method combinations of CLOS. | |
(defparameter *input-10* |
<?php | |
// This works best on Apache, and if you have enable_post_data_reading off. | |
// Set "php_flag enable_post_data_reading off" in your htaccess. It'll avoid having to parse multipart forms. | |
// enter the sock to connect to here | |
const SOCK_TO_CONNECT_TO = './run.sock'; | |
// Close the session right now, because it might make everything faster, and we don't know how long the response will last for. | |
session_write_close(); |