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
| ;;; make-box.el --- Box around part of a buffer -*- lexical-binding: t -*- | |
| ;; Copyright (C) 2024 Nicolas P. Rougier | |
| ;; Maintainer: Nicolas P. Rougier <Nicolas.Rougier@inria.fr> | |
| ;; Version: 0.1.0 | |
| ;; Package-Requires: ((emacs "27.1")) | |
| ;; Keywords: convenience | |
| ;; This file is not part of GNU Emacs. |
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
| (defun my/org-toggle-emphasis (type) | |
| "Toggle org emphasis TYPE (a character) at point." | |
| (cl-labels ((in-emph (re) | |
| "See if in org emphasis given by RE." | |
| (and (org-in-regexp re 2) | |
| (>= (point) (match-beginning 3)) | |
| (<= (point) (match-end 4)))) | |
| (de-emphasize () | |
| "Remove most recently matched org emphasis markers." | |
| (save-excursion |
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
| #! /usr/bin/env bash | |
| # ansi colors | |
| bold='\033[1m' | |
| red='\033[0;31m' | |
| green='\033[0;32m' | |
| yellow='\033[1;33m' | |
| blue='\033[0;34m' | |
| reset='\033[0m' |
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
| ;;; echo-line.el --- Echo messages in minibuffer -*- lexical-binding:t -*- | |
| ;; | |
| ;; Author: Al Haji-Ali <abdo.haji.ali@gmail.com> | |
| ;; Version: 0.1.0 | |
| ;; Package-Requires: ((emacs "26.1")) | |
| ;; Keywords: message, echo, gui | |
| ;; | |
| ;; This file is not part of GNU Emacs. | |
| ;; | |
| ;; This program is free software; you can redistribute it and/or modify |
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
| (defun me/counsel-ag-roam () | |
| "Do counsel-ag on the org roam directory" | |
| (interactive) | |
| (counsel-ag nil org-roam-directory)) |
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
| ;; see cups help page for lots on how to print with lpr and lp | |
| ;; the below functions assume these options are set | |
| (setq pdf-misc-print-program-executable "/usr/bin/lpr" | |
| pdf-misc-print-program-args (list "-o sides=two-sided-long-edge")) | |
| ;;; print-helper -- not enough to make a stand-alone package | |
| (require 'dash) | |
| ;;;###autoload | |
| (defun ph--get-list-of-priters () |
TLP, a power management utility for Thinkpads and other laptops, uses tpacpi-bat script for battery calibration and setting charge thresholds (for Thinkpads xx20 and later), which in turn uses acpi_call Linux kernel module that enables calls to ACPI methods through /proc/acpi/call. acpi_call can also be used for hybrid graphics switching and other power management tasks.
As explained here and here, a kernel upstream commit made seek support for [procfs](https://en.wikipedia.org/wiki/
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
| """ | |
| Estimate GPT-3 costs! | |
| Author: Dylan | |
| """ | |
| import math | |
| class GPT3CostsCalculator: | |
| def __init__(self, | |
| gpt3_model_version, |
NewerOlder