Skip to content

Instantly share code, notes, and snippets.

View SequentialDesign's full-sized avatar

Daniel Alejandro Tapia SequentialDesign

View GitHub Profile
@SequentialDesign
SequentialDesign / combined.rb
Last active June 2, 2025 18:51
word and phrase counter in Ruby
require "csv"
require "progress_bar"
input_file = "movie_subtitles_en_new.txt"
output_dir = "split_files"
Dir.mkdir(output_dir) unless Dir.exist?(output_dir)
# configuration
MIN_PHRASE_LEN = 2
MAX_PHRASE_LEN = 7
@SequentialDesign
SequentialDesign / gist:02ee8286305785f883160c7463efe908
Created November 13, 2024 21:08 — forked from jackrusher/gist:5139396
Hofstadter on Lisp: Atoms and Lists, re-printed in Metamagical Themas.

Hofstadter on Lisp

In the mid-80s, while reading through my roommate's collection of Scientific American back issues, I encountered this introduction to Lisp written by Douglas Hofstadter. I found it very charming at the time, and provide it here (somewhat illegally) for the edification of a new generation of Lispers.

In a testament to the timelessness of Lisp, you can still run all the examples below in emacs if you install these aliases:

(defalias 'plus #'+)
(defalias 'quotient #'/)
(defalias 'times #'*)
(defalias 'difference #'-)
@SequentialDesign
SequentialDesign / install lem.txt
Created November 11, 2024 10:51
how to install lem on linux (garuda (arch))
installing lem
go here and click on the right download. mine was under AMD64 and across from linux
https://www.sbcl.org/platform-table.html
cd to the folder you downloaded it to
cd Downloads/
decompress the file you downloaded. it has the sbcl binary
bzip2 -cd sbcl-2.4.10-x86-64-linux-binary.tar.bz2 | tar xvf -
xrandr --output HDMI-1 --below DP-1 --auto
xrandr --setmonitor Virtual-0 1920/531x2160/598+0+0 DP-1,HDMI-1
xrandr --output HDMI-1 --below DP-1 --auto
xrandr --setmonitor Virtual-0 1920/531x2160/598+0+0 DP-1,HDMI-1
https://github.com/stumpwm/stumpwm
mkdir builds
cd builds
uname -m
http://sbcl.org/platform-table.html
wget http://prdownloads.sourceforge.net/sbcl/sbcl-2.4.1-x86-64-linux-binary.tar.bz2
@SequentialDesign
SequentialDesign / hotkeys-for-28.el
Created January 30, 2024 17:02
emacs hotkeys for 28
(progn
(define-key key-translation-map [?\C-h] [?\C-?])
(define-key key-translation-map [?\M-h] [?\M-\d])
;; (define-key key-translation-map (kbd "C-M-h") (kbd "C-S-<backspace>"))
;;(keymap-global-set "C-h" #'backward-delete-char)
;;(keymap-global-set "M-h" #'backward-kill-word)
(global-set-key (kbd "M-o") #'other-window)
(global-set-key (kbd "M-H") #'mark-paragraph)
(global-set-key (kbd "C-M-S-h") #'mark-defun)
(defcfg)
(defsrc
spc
h
i
e
a
t
n
(defcfg)
(defsrc
spc
h
i
e
a
t
n
(defcfg)
(defsrc
spc
h
i
e
a
t
n