Skip to content

Instantly share code, notes, and snippets.

@Gavinok
Gavinok / productive.org
Created April 26, 2024 03:39
Show notes from my Double Your Productivity With Emacs Org-mode video

Double Your Productivity With Org Mode

What is productivity?

Using the oxford dictionary

Productivity
the rate at which a worker, a company or a country produces goods, and the amount produced, compared with how much time, work and money is needed to produce them
# Created 2024-04-23 Tue 15:20
#+title: Lets Learn Emacs Lisp
#+author: Gavin Jaeger-Freeborn
* Emacs terminology
[[https://sachachua.com/blog/wp-content/uploads/2013/05/How-to-Learn-Emacs-v2-Large.png][How to Learn Emacs]]
- buffer :: The area containing text kinda like a *tab in a browser*
- point :: The *cursor*
- window :: A section of the emacs window containing text
@Gavinok
Gavinok / tables.org
Last active April 5, 2024 06:17
Show notes for my video on org tables

Org tables

Creating a table

| |
Designates a table
|-
Followed by a space will create a horizontal line
  • you can navigate them intuitively with tab return etc
    NameAge
    Gavin100
@Gavinok
Gavinok / eglot-codelens.el
Created March 12, 2024 22:10
Add support for code lenses in eglot for emacs
;; eglot-codelens.el --- Add support for codelenses to eglot -*- lexical-binding: t -*-
;;; Commentary:
;;; Code:
;;; Extending eglot to support lenses
;;;; Findings
;; Lenses often support the option to be used as a code action
;; some servers rely on custom code actions implemented by the client
;; - [[https://github.com/emacs-lsp/lsp-mode/issues/2250]] mentions this
@Gavinok
Gavinok / gist-from-region-v4.el
Last active March 8, 2024 20:34
Elisp code for quickly creating a github gist from a given region
(defun gist-from-region (BEG END fname desc &optional private)
"Collect the current region creating a github gist with the
filename FNAME and description DESC.
If the optional argument PRIVATE is non-nil then the gist will be
made private. Otherwise the gist will be default to public.
Depends on the `gh' commandline tool"
(interactive (list (mark) (point)
(read-string "File Name: ")
(read-string "Description: ")
@Gavinok
Gavinok / gist-from-region-v3.el
Created March 8, 2024 20:32
Elisp code for quickly creating a github gist from a given region
(defun gist-from-region (BEG END fname desc &optional private)
"Collect the current region creating a github gist with the
filename FNAME and description DESC.
If the optional argument PRIVATE is non-nil then the gist will be
made private. Otherwise the gist will be default to public.
Depends on the `gh' commandline tool"
(interactive (list (mark) (point)
(read-string "File Name: ")
(read-string "Description: ")
@Gavinok
Gavinok / init.el
Last active March 2, 2024 15:41
A minimal emacs configuration using evil mode and use-package
;;; Startup
;;; PACKAGE LIST
(setq package-archives
'(("melpa" . "https://melpa.org/packages/")
("elpa" . "https://elpa.gnu.org/packages/")))
;;; BOOTSTRAP USE-PACKAGE
(package-initialize)
(setq use-package-always-ensure t)
(unless (package-installed-p 'use-package)
@Gavinok
Gavinok / learn.org
Created February 29, 2024 23:13
Learn Emacs Lisp in 30 Minutes

Lets Learn Emacs Lisp

Emacs terminology

How to Learn Emacs

buffer
The area containing text kinda like a tab in a browser
point
The cursor
window
A section of the emacs window containing text
@Gavinok
Gavinok / navigating_between_multiple_files.vim
Last active February 27, 2024 14:41
Confuguration used for navigating between files in vim.
" File: video.vim
" Maintainer: Gavin Jaeger-Freeborn <gavinfreeborn@gmail.com>
" Created: Tue 25 Aug 2020 09:24:20 PM
" License:
" Copyright (c) Gavin Jaeger-Freeborn. Distributed under the same terms as Vim itself.
" See :help license
"
" Description:
" This is a list of useful mappings for vim
@Gavinok
Gavinok / chem.rec
Last active January 21, 2024 00:28
Example code used in a video on GNU recutils ( includes both chem.rec and chem.sh)
%rec: periodic_table
%sort: AtomicNumber
# all values came from
# https://pubchem.ncbi.nlm.nih.gov/periodic-table/
AtomicNumber: 1
Symbol: H
Name: Hydrogen
AtomicMass: 1.0080