Skip to content

Instantly share code, notes, and snippets.

View casouri's full-sized avatar
💭
I may be slow to respond.

Yuan Fu casouri

💭
I may be slow to respond.
View GitHub Profile
Cost: (besides storage cost)
8 KB/object for metadata in s3, bill at s3 price
32 KB/object for index in glacier, billed at glacier price
Early deletion/overwrite fee: Delete or overwrite before stored for 90
days (glacier) or 180 days (deep glacier).
Transition cost/object:
@casouri
casouri / eglot-rust-analyzer.el
Last active December 3, 2024 00:27
Configuring eglot for rust-analyzer
;; How to translate LSP configuration examples into Eglot’s format:
;;
;; Usually LSP servers will say something like
;;
;; rust-analyzer.procMacro.attributes.enable (default: true)
;;
;; Translate that into a JSON LSP configuration, you get
;;
;; {
;; "rust-analyzer": {
(defun scroll-up-benchmark ()
(interactive)
(let ((oldgc gcs-done)
(oldtime (float-time))
(count 0))
(condition-case nil (while t (scroll-up) (redisplay) (cl-incf count))
(error (message "GCs: %d Elapsed time: %f seconds Second/scroll: %f"
(- gcs-done oldgc) (- (float-time) oldtime)
(/ (- (float-time) oldtime) count))))))
#include <string.h>
#include <stdio.h>
#include <tree_sitter/api.h>
#include <stdlib.h>
TSLanguage *tree_sitter_c();
struct buffer {
char *buf;
long len;
root@gnu ~# fdisk /dev/nvme0n1
Welcome to fdisk (util-linux 2.35.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Command (m for help): p
Disk /dev/nvme0n1: 232.91 GiB, 250059350016 bytes, 488397168 sectors
Disk model: Samsung SSD 960 EVO 250GB
(use-modules (gnu)
(gnu system nss)
(gnu packages gnome)
(gnu packages version-control)
(gnu packages emacs))
(use-service-modules desktop xorg)
(use-package-modules certs)
(operating-system
(host-name "Blanche")
Process: TeXmacs [42808]
Path: /Applications/TeXmacs.app/Contents/MacOS/TeXmacs
Identifier: org.texmacs.TeXmacs
Version: 2.1 (2.1)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: TeXmacs [42808]
User ID: 501
Date/Time: 2021-09-26 00:35:13.177 -0700
(kbd-map
(:profile emacs)
("emacs:meta c" (kbd-copy))
("emacs:meta v" (kbd-paste))
("emacs:meta s" (save-buffer))
("emacs:meta u" (revert-buffer))
("emacs:meta :" (interactive footer-eval))
("emacs:meta f" (traverse-right))
("emacs:meta b" (traverse-left))
This file has been truncated, but you can view the full file.
Date/Time: 2021-01-02 13:40:53.922 -0500
End time: 2021-01-02 13:40:55.528 -0500
OS Version: macOS 11.1 (Build 20C69)
Architecture: x86_64h
Report Version: 32
Data Source: Stackshots
Shared Cache: 467A83CB-BA86-3F07-B652-B9256C74080A slid base address 0x7fff20027000, slide 0x27000
Command: Emacs
RTL in RTL
الثعلب البني السريع يقفز فوق الكلب الكسول.الثعلب البني السريع يقفز فوق الكلب الكسول.الثعلب البني السريع يقز فوق ال 《الكسو ل.الثعل 》 ب الكسول.الثعلب البني السريع يقفز
LRT in LRT
中文中文中文中文中文中文中文中文中文中文中文中文中文中文,中文《中文中文》中文中文中文中文中文中中文中文中文中文中中文中文中文中文中文
LRT in RTL