A one-liner to connect to a server (eg, [email protected]
):
ssh -o "RequestTTY force" [email protected] -- tmux new -A -s default
Explanation:
import { getRuntime } from "@astrojs/cloudflare/runtime"; | |
import type { KVNamespace } from "@cloudflare/workers-types"; | |
/** The KV key (eg, env["KV"]) */ | |
const KV_KEY = "KV" as const; | |
/** | |
* Returns a Cloudflare Worker KV store. | |
* In dev, it returns a mock one based on Miniflare. | |
*/ |
A one-liner to connect to a server (eg, [email protected]
):
ssh -o "RequestTTY force" [email protected] -- tmux new -A -s default
Explanation:
──────────────────────────────────────────────────────────────────────
Insert mode
──────────────────────────────────────────────────────────────────────
insert [i] ┄┄┐ ┌── [a] append
(left of cursor) ┆ ┆ (right of cursor)
┌─┐
Hello e│v│eryone. ┆
└─┘ └┄┄┄ [A] append
Using JavaScript in Rails has a very long history. With Rails 7, the latest approach has been to move away from the tools from the JavaScript community like npm, yarn, and Webpack. Instead, Rails 7 introduces importmap-rails as a solution that “embraces the platform” and uses native JavaScript modules (also known as “ES Modules” or “ESM”).
Importmap-rails is touted as a gem that “let you import JavaScript modules directly from the browser” 1. The documentation claims that “this frees you from needing Webpack, Yarn, npm, or any other part of the JavaScript toolchain.”
At first, I felt like those claims are a bit ambiguous and a bit of marketing hype. After exploring importmap-rails a bit more, I think I have another way of looking at it. importmap-rails is a replacement for npm for app builders. That is: take away npm’s authoring tools (like `
An ASCII diagram of the Miryoku layout based on this image.
miryoku
base ┌────┬────┬────┬────┬────┐ ┌────┬────┬────┬────┬────┐
│ q │ w │ f │ p │ b │ │ j │ l │ u │ y │ ' │
├────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┤
│ a ⌥│ r ⌘│ s ^│ t ⇧│ g │ │ m │ n ⇧│ e ^│ i ⌘│ o ⌥│
Turning off appendWindowsPath (the feature that adds /mnt/c paths to $PATH) can make WSL faster.
For most distros, it can be done by editing /etc/wsl.conf. These instructions were taken from https://gist.github.com/ilbunilcho/4280bd55a10cefef75e74986b6bff936
$ sudo vi /etc/wsl.conf
# Save as Brewfile, then run `brew bundle` in the same directory | |
tap "homebrew/cask" | |
tap "homebrew/cask-fonts" | |
brew "curl" | |
brew "exa" # Improved directory listing | |
brew "fish" | |
brew "forego" | |
brew "fzf" |
One of the things that bothered me with VSCode-Vim was with how slow it was to use (number)(arrow)
(eg, 42(down)
) to move multiple lines down. In the screencast below, notice how it goes line-by-line rather than skipping ahead instantly.
☝ Figure 1: VSCode scrolls slooowly line-by-line when pressing
42(down)
.
⭐ This post is best experienced in my blog: https://ricostacruz.com/posts/javascript-in-rails-7
JavaScript in Rails 7 will be different: Webpacker is retired, and there are 2 new gems to manage frontend files.