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
;; timer variable | |
(defvar idle-timer-show-org-agenda-timer nil) | |
;; start function | |
(defun se/idle-timer-show-org-agenda-start () | |
(interactive) | |
(when (timerp idle-timer-show-org-agenda-timer) | |
(cancel-timer idle-timer-show-org-agenda-timer)) | |
(setq idle-timer-show-org-agenda-timer | |
(run-with-idle-timer (* 10 60) 1 #'org-agenda-list))) |
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
;;lsp-doctor suggestions https://emacs-lsp.github.io/lsp-mode/page/performance/ | |
(setq gc-cons-threshold 100000000) | |
(setq read-process-output-max (* 1024 1024)) ;; 1mb | |
(setq lsp-idle-delay 0.500) | |
(use-package lsp-treemacs | |
:ensure t) | |
(use-package lsp-mode | |
:ensure t | |
:hook ((rust-mode . lsp) |
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
$ cabal v2-run ./install.hs --project-file install/shake.project 8.10.7 | |
Resolving dependencies... | |
Build profile: -w ghc-8.10.7 -O1 | |
In order, the following will be built (use -v for more details): | |
- fake-package-0 (exe:script) (configuration changed) | |
Configuring executable 'script' for fake-package-0.. | |
Preprocessing executable 'script' for fake-package-0.. | |
Building executable 'script' for fake-package-0.. | |
[1 of 1] Compiling Main ( Main.hs, /home/shae/build/haskell-language-server/dist-newstyle/build/x86_64-linux/ghc-8.10.7/fake-package-0/x/script/build/script/script-tmp/Main.o ) | |
Linking /home/shae/build/haskell-language-server/dist-newstyle/build/x86_64-linux/ghc-8.10.7/fake-package-0/x/script/build/script/script ... |
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
(use-package lsp-ui | |
:ensure t | |
:after (lsp-mode) | |
:hook ((lsp-mode . lsp-ui-mode) | |
(lsp-mode . flycheck-mode)) | |
:config | |
(setq lsp-prefer-flymake nil) | |
) |
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
{ lib, stdenv | |
, SDL2 | |
, alsaLib | |
, autoconf | |
, automake | |
, cmake | |
, gcc | |
, git | |
, lapack | |
, libpulseaudio |
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
;; useful trick from https://www.reddit.com/r/emacs/comments/idz35e/emacs_27_can_take_svg_screenshots_of_itself/ | |
(defun screenshot-svg () | |
"Save a screenshot of the current frame as an SVG image. | |
Saves to a temp file and puts the filename in the kill ring." | |
(interactive) | |
(let* ((filename (make-temp-file "Emacs" nil ".svg")) | |
(data (x-export-frames nil 'svg))) | |
(with-temp-file filename | |
(insert data)) | |
(kill-new filename) |
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
(use-package lsp-mode | |
:ensure t | |
:hook ((rust-mode . lsp) | |
(go-mode . lsp) | |
(python-mode . lsp) | |
(haskell-mode . lsp) | |
(js-mode . lsp)) | |
:commands lsp-ui-mode | |
) | |
) |
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
# for long running commands | |
function try () { | |
bloohm "/dev/ttyACM0" Yellow $PWD:A "$*" | |
time $* && fin || die; # cargo install tally, replacement for time | |
} | |
function play_sound () { | |
aplay -N -q $HOME/.bin/$1.au | |
} |
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
import time | |
import board | |
import busio | |
import adafruit_trellism4 | |
import adafruit_adxl34x | |
import supervisor | |
# Set up Trellis and accelerometer | |
trellis = adafruit_trellism4.TrellisM4Express(rotation=0) | |
i2c = busio.I2C(board.ACCELEROMETER_SCL, board.ACCELEROMETER_SDA) |
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
Host * | |
ServerAliveInterval 15 | |
ServerAliveCountMax 3 | |
ControlMaster auto | |
ControlPath ~/.ssh/ssh-%h-%p-%r | |
ConnectionAttempts 2 | |
ForwardAgent yes | |
ControlPersist 2m |