This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
This file contains hidden or 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 hidden or 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 () { | |
| tally $* && fin || die; # cargo install tally, replacement for time | |
| } | |
| function play_sound () { | |
| afplay $HOME/.bin/$1.wav | |
| } | |
| function notify_success() { |
This file contains hidden or 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
| \documentclass{article} | |
| \usepackage[margin=1.5in]{geometry} | |
| \usepackage{fancyhdr} | |
| %include lhs2TeX.fmt | |
| %include lhs2TeX.sty | |
| \pagestyle{fancy} | |
| \lhead{\footnotesize November 1 2012} | |
| \rhead{\footnotesize CS410W -- Word Frequency Count in Haskell -- Shae Erisson} | |
| \begin{document} | |
| \section*{Word frequency count in Haskell} |
This file contains hidden or 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
| {-# LANGUAGE DeriveGeneric #-} | |
| {-# LANGUAGE DerivingStrategies #-} | |
| {-# LANGUAGE MultiParamTypeClasses #-} | |
| {-# LANGUAGE OverloadedStrings #-} | |
| {-# LANGUAGE QuasiQuotes #-} | |
| {-# LANGUAGE TemplateHaskell #-} | |
| {-# LANGUAGE TypeFamilies #-} | |
| module Main where | |
| import Data.ByteString.Lazy.Char8 (ByteString) |
This file contains hidden or 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
| all the fio commands from https://askubuntu.com/a/991311/2598 | |
| with one of two drives in my laptop: | |
| samsung 970 pro | |
| READ: bw=3295MiB/s (3455MB/s), 3295MiB/s-3295MiB/s (3455MB/s-3455MB/s), io=10.0GiB (10.7GB), run=3108-3108msec | |
| WRITE: bw=2530MiB/s (2653MB/s), 2530MiB/s-2530MiB/s (2653MB/s-2653MB/s), io=10.0GiB (10.7GB), run=4048-4048msec | |
| READ: bw=55.3MiB/s (57.9MB/s), 55.3MiB/s-55.3MiB/s (57.9MB/s-57.9MB/s), io=3316MiB (3477MB), run=60001-60001msec | |
| READ: bw=624KiB/s (639kB/s), 624KiB/s-624KiB/s (639kB/s-639kB/s), io=36.6MiB (38.4MB), run=60004-60004msec | |
| WRITE: bw=624KiB/s (639kB/s), 624KiB/s-624KiB/s (639kB/s-639kB/s), io=36.5MiB (38.3MB), run=60004-60004msec | |
| samsung 970 evo plus |