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 / 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 / ll.c
Created March 27, 2023 19:43
Basic linked list library
#include <assert.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
/* typedef void *TaskHandle_t; */
/* enum task_type { VAL1, VAL2 }; */
/* typedef struct DD_Task { */
/* TaskHandle_t t_handle; */
/*
FreeRTOS V9.0.0 - Copyright (C) 2016 Real Time Engineers Ltd.
All rights reserved
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the
/*
FreeRTOS V9.0.0 - Copyright (C) 2016 Real Time Engineers Ltd.
All rights reserved
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the