This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Author: Zakaria Kebairia | |
# Email: 4.kebairia@gmail.com | |
# | |
# Description: This script prompts the user to select a prompt from a fil | |
# Set shell options: | |
# e: Exit immediately if a command exits with a non-zero status code, | |
# u: Treat unset variables as an error, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from manim import * | |
import random | |
class Samples(Scene): | |
_bg = "#282828" | |
font_size = 30 | |
font_size_samples = 10 | |
label_font_size = 20 | |
squares = 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; I took `capitalize-first-char` function from here ↙↙ | |
;; https://emacs.stackexchange.com/a/12614 | |
(defun zk/capitalize-first-char (&optional string) | |
"Capitalize only the first character of the input STRING." | |
(when (and string (> (length string) 0)) | |
(let ((first-char (substring string nil 1)) | |
(rest-str (substring string 1))) | |
(concat (capitalize first-char) rest-str)))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; gc-cons-threshold is the number of bytes of consing before a garbage collection is invoked. It’s normally set at 800,000 bytes, but for me that invokes the GC 39 times!!! during startup (gcs-done) , and the GC is sloooow. I’ve set it to ~384M above. And now no GC invocations during startup. source: 2 easy little known steps to speed up Emacs start up time | |
;; reset the gc-cons-threshold to its defaults values after startup | |
;; **Faster Startup** | |
;; Speed up startup | |
(setq gc-cons-threshold 402653184 | |
gc-cons-percentage 0.6) | |
(add-hook 'after-init-hook | |
`(lambda () | |
(setq gc-cons-threshold 800000 | |
gc-cons-percentage 0.1) |