Skip to content

Instantly share code, notes, and snippets.

View daviderestivo's full-sized avatar
🎧
Focusing

Davide Restivo daviderestivo

🎧
Focusing
View GitHub Profile
@daviderestivo
daviderestivo / _reader-macros.md
Created March 11, 2023 16:18 — forked from chaitanyagupta/_reader-macros.md
Reader Macros in Common Lisp

Reader Macros in Common Lisp

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.

@daviderestivo
daviderestivo / boost-low-pri-macOS.sh
Created September 25, 2022 10:10 — forked from mayankk2308/boost-low-pri-macOS.sh
Boost Low-Priority Tasks on macOS
# Useful for improving Time Machine backup prep. times, Mac App Store install speeds, etc.
sudo sysctl debug.lowpri_throttle_enabled=0
# To restore defaults
sudo sysctl debug.lowpri_throttle_enabled=1
@daviderestivo
daviderestivo / how-to-enable-notes-export-from-kobo.md
Created September 25, 2022 10:09 — forked from samuelsmal/how-to-enable-notes-export-from-kobo.md
how to export notes and highlights from kobo

steps

  1. connect kobo to your device
  2. open a file browser
  3. navigate to the hidden folder .kobo/Kobo
  4. open the file Kobo eReader.conf
  5. navigate to the section [FeatureSettings]
  6. add the line ExportHighlights=true and save
  7. disconnect the device
  8. now you can long press on a book and export the note file into a .txt file which will be saved alongside your books. to get it connect your ereader.
@daviderestivo
daviderestivo / deep-binding.lisp
Created January 3, 2022 21:55 — forked from nyuichi/dee-binding.lisp
deep binding vs shallow binding
;;;; **deep binding**
;;; look up
(cdr (assq 'the-symbol *the-stack*))
;;; funcall
; wind...
(loop for arg in args