Skip to content

Instantly share code, notes, and snippets.

View cdegroot's full-sized avatar

Cees de Groot cdegroot

View GitHub Profile

Private repos

  • adrs - probably not useful, just moved to ARCHIVE-
  • aws-serverless - ditto, just moved to ARCHIVE-
  • backend - most of the fun stuff, moved to ARCHIVE-, recreated clean repo
  • canary - empty, just moved to ARCHIVE- to get it out of the way
  • dashboard - very old version of our code (early 2021), moved to ARCHIVE-
  • docs - not really useful, moved to ARCHIVE-
  • ebpf-agent - interesting Rust stuff, there are not many examples around. moved original to ARCHIVE-, created clean repo
  • engineering - random stuff, moved to ARCHIVE-
TEST FUNARG
define ((
(double (lambda (x) (plus x x)))
))
double (6)
deflist ((
(test-fexpr (lambda (args alist)
(prog () (print args) (print alist))))
@cdegroot
cdegroot / init.lisp
Created July 19, 2023 14:22
StumpWM + spatial groups + Emacs-per-group-z-index = bliss.
;;;
;;; We run a server per z-index.
;;;
(defparameter *xdg-runtime-dir* (getenv "XDG_RUNTIME_DIR"))
(defparameter *emacs-socket-dir* (concatenate 'string *xdg-runtime-dir* "/emacs/"))
(defun cur-z ()
(third (split-string (group-name (current-group)) ",")))
(defun cur-socket ()
(concatenate 'string *emacs-socket-dir* (cur-z)))
@cdegroot
cdegroot / main.yml
Created April 14, 2023 15:09
Caching preamble for Elixir workflows in GitHub Actions
steps:
- uses: actions/checkout@v3
- name: asdf setup
uses: asdf-vm/actions/setup@v1
- name: Restore asdf cache
id: asdf-cache
uses: actions/cache@v3
with:
(eval-after-load "term"
'(defun term-handle-ansi-terminal-messages (message)
;; Is there a command here?
(while (string-match "\eAnSiT.+\n" message)
;; Extract the command code and the argument.
(let* ((start (match-beginning 0))
(command-code (aref message (+ start 6)))
(argument
(save-match-data
(substring message
@cdegroot
cdegroot / gist:faea0f01e3df7267f5c26308db53459a
Created March 27, 2021 01:51
nonguix dotnet 5.0 -> dotnet core 3.1 patch
diff --git a/nongnu/packages/dotnet.scm b/nongnu/packages/dotnet.scm
index fa4c815..54e748f 100644
--- a/nongnu/packages/dotnet.scm
+++ b/nongnu/packages/dotnet.scm
@@ -81,11 +81,11 @@ Roslyn workspaces. It provides project dependencies and C# language services to
various IDEs and plugins.")
(license license:expat)))
-(define-public dotnet
- (let ((dotnet-sdk-version "5.0.4"))
defmodule User do
@defaults name: nil, age: 0
defstruct @defaults
import Record
defrecord(:user, @defaults)
end
defmodule Bench do
def run do
import User
loops = 1..10000000
loader: version is 20151220+e48858d
memory: initial memory map:
0x0000000000001000-0x0000000000060000 (380 KiB) -> Internal
0x0000000000060000-0x000000000009f000 (252 KiB) -> Free
0x0000000000100000-0x00000000dfff0000 (3668928 KiB) -> Free
0x0000000000000001-0x0000000020000000 (524288 KiB) -> Free
bios: boot device ID is 0x80, partition offset is 0x1000
fs: mounted FAT on hd0,0 ('') (uuid: F766-8E3E)
fs: mounted ext2 on hd0,1 ('') (uuid: 95e269fa-6e6c-493b-87bc-78ddb0cf90dc)
device: detected devices:
Leaving directory ‘/home/cees/.emacs.d/elpa/ein-20190522.149’
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Compiling file /home/cees/.emacs.d/elpa/ein-20190522.149/ein-ac.el at Fri May 24 13:29:03 2019