function sshtmuxattach {
if [[ $# -ne 2 || -z “$1” || -z “$2” ]] ; then
printf “Usage: ${FUNCNAME[0]}
printf “SSH into HOST and attach to Tmux SESSION.\n”
return 1
fi
local host=$1;
local session=$2
ssh “$host” -t tmux attach -t “$session”
}
Author: grant
(Emacs+Org-Mode) Hydra For Committing Thing Messages
I want some statistics on my Git commits. Over a time period what did I spend most of it doing? My only questions: what was new, what was refined, and what was fixed. It is a simple question but sometimes I forget the difference between what I consider new versus refined. There are other kids of commits, too.
When I work on GitHub (or the like) I want to handle numbered tasks within my commit message. For example you can close a ticket my writing “Closes #214”. It is commit related. The last thing I use is sort of like a commit.
My Org-Mode workflow is what I feel pretty basic but uses refiling, archiving, and refiling a lot. When I make those changes, it is to me, like a commit.So I put all of those messages in here, too.
Continue reading “(Emacs+Org-Mode) Hydra For Committing Thing Messages”
(Emacs+Org-Mode) Hydra To Insert Timestamps
What time is it when you have nine ways to insert timestamps with Emacs?
Continue reading “(Emacs+Org-Mode) Hydra To Insert Timestamps”
(Emacs+Org-Mode) The Best Font For LaTeX Exports With Org-Mode
There are plenty of options. It is nice to settle on one.
Continue reading “(Emacs+Org-Mode) The Best Font For LaTeX Exports With Org-Mode”
(Emacs+Org-Mode) A Hydra To Help Describe
Do you forget how to get help describing things? I always do.
Here is how I remember.
Continue reading “(Emacs+Org-Mode) A Hydra To Help Describe”
Test Your Emacs Themes In Black And White On macOS
A hardware and operating system implementer, whom I can’t recall, once quipped that using color on computer monitors added no value and was in fact a waste of memory. Interesting. NeXT monitors started out grayscale, I wonder why.
Continue reading “Test Your Emacs Themes In Black And White On macOS”
(Emacs+Org-Mode) Two Ways To Reload File Variables Using A Hydra
It is works anywhere but it is easier to remember if you add it to an existing Hydra.
Here is the code.
("H" (lambda () (interactive) (hack-local-variables) (message "Local variables hacked"))) ("N" normal-mode)
Here is the documentation.
_H_ hack-local-variables (see also normal-mode) _N_ normal-mode (see also hack-local-variables)
(Emacs+Org-Mode) If You Go Insane Trying To Deal With Lisp Code Squashed Into One Line Then Read On To See The Fix
There are two situations where I end up with really important Lisp code that is squashed up into one un-readable and consequently painful line:
- Reading Backtrace when
toggle-debug-on-error
is true - Using Lisp in a YAS template like this for example
The thing is that those lines are really important to me. I need to get them readable.
My solution had always been to manually re-indent them. Uggh. But after doing this way too many times, I ran into an issue tonight that demanded my full attention. Fortunately there is a really simple solution.
(Emacs+Org-Mode) If You Enjoy Writing Even A Little Bit With Emacs Then Add This Em-Dash Code Now
The EM-DASH provokes mixed feelings mostly in writers, and maybe readers if they notice it (probably the writers are the ones noticing it while reading). But the EM-DASH is a really nice way to break up a sentence when a COMMA or a SEMI-COLON or a COLON just won’t do it.
You Are Using rsync Incorrectly And You Will Lose Everything Unless You Read This Now!
rsync is generous in its functionality and flexible in how you use it. The only bad things it can do are what you tell it. The most important thing that you need to know immediately about rsync
is that you can get a preview of what you are telling it to do before it actually does it. Here is how