Skip to content

Instantly share code, notes, and snippets.

View michaelmrose's full-sized avatar
💭
Available to hire

Michael Rose michaelmrose

💭
Available to hire
View GitHub Profile
@michaelmrose
michaelmrose / mytabs.el
Created May 7, 2022 20:19
Emacs Powerline Tabs
;;; package -- Summary
;;; my tabs settings and configuration
;;; mytabs.el
;;; Commentary:
;;; Code:
;; Global Bindings
(require 'evil)
(global-set-key (kbd "C-t") 'tab-bar-new-tab)
@michaelmrose
michaelmrose / fdisk
Created February 24, 2022 19:47
fdisk -l output
Disk /dev/mtdblock0: 16 MiB, 16777216 bytes, 32768 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mmcblk0: 116.5 GiB, 125090922496 bytes, 244318208 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
@michaelmrose
michaelmrose / switch-audio.fish
Created July 31, 2021 00:10
switch audio script
#!/usr/bin/env fish
# Requires both fish shell and ponymix to work
# https://github.com/falconindy/ponymix
function next-valid-index
set val $argv[1]
set lst $argv[2..-1]
set n (findindex $val $lst)
if test $n -ge (count $lst)
evdev:input:b*v05F3p00FF*
KEYBOARD_KEY_90001=f14
KEYBOARD_KEY_90002=f15
KEYBOARD_KEY_90003=f16
@michaelmrose
michaelmrose / anonymous-gist.
Created June 17, 2020 18:51
update-agenda-in-background
(defun mmr/agenda-to-html-in-background ()
(async-start (lambda ()
(save-excursion
(with-current-buffer (get-buffer-create "*Org Agenda*")
(org-agenda nil "a"))))
(lambda (a)
(with-current-buffer (htmlize-buffer (get-buffer "*Org Agenda*"))
(write-region (point-min) (point-max) "/tmp/agenda-web.html")))))
smartctl -i /dev/sdc
smartctl 7.1 2019-12-30 r5022 [x86_64-linux-5.6.15-1-MANJARO] (local build)
Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF INFORMATION SECTION ===
Model Family: Indilinx Barefoot based SSDs
Device Model: OCZ-VERTEX
Serial Number: 4V1K0T5245OML285C2G4
Firmware Version: 1.4
User Capacity: 32,017,047,552 bytes [32.0 GB]
;; This buffer is for text that is not saved, and for Lisp evaluation.
;; To create a file, visit it with C-x C-f and enter text in its buffer.
@michaelmrose
michaelmrose / anonymous-gist.el
Created April 28, 2020 02:06
fixing underscores in org in as complicated manner as possible
(eval-after-load 'autoinsert
'(define-auto-insert '(org-mode . "Org Skeleton")
'("Description: "
"#+OPTIONS: ^:{} \n \n")))
(setq auto-insert-query nil)
;; the options defined in org skeleton aren't effective until the file is reread or normal-mode is executed
;; so lets run normal mode after we insert the text
(advice-add 'auto-insert :after 'normal-mode)
@michaelmrose
michaelmrose / i3.desktop
Created April 18, 2020 22:47
i3 session file
[Desktop Entry]
Name=i3
Comment=improved dynamic tiling window manager
Exec=i3
TryExec=i3
Type=Application
X-LightDM-DesktopName=i3
DesktopNames=i3
Keywords=tiling;wm;windowmanager;window;manager;
org-fontify-done-headline t
org-fontify-quote-and-verse-blocks t
org-fontify-whole-heading-line t
org-hide-emphasis-markers t
org-hide-leading-stars t
org-pretty-entities t
org-refile-use-outline-path 'file
org-refile-allow-creating-parent-nodes t
org-outline-path-complete-in-steps nil
org-src-tab-acts-natively t