Skip to content

Instantly share code, notes, and snippets.

View pprevos's full-sized avatar

Peter Prevos pprevos

View GitHub Profile
@Gavinok
Gavinok / chatgpt.el
Last active July 12, 2024 21:32
chatgpt client for emacs WIP (Now Async!)
;;; chatgpt.el --- Simple ChatGPT frontend for Emacs -*- lexical-binding: t -*-
;; Copyright (C) Gavin Jaeger-Freeborn
;; This package is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 3, or (at your option)
;; any later version.
;; This package is distributed in the hope that it will be useful,
## Decoding lyrics — @pprevos
## https://github.com/pprevos/r.prevos.net/blob/master/Miscellaneous/lyrics.R
library(tidyverse)
library(tidytext)
library(reshape2)
library(rvest)
get_lyrics <- function(artist, song) {
artist <- gsub("[^A-Za-z0-9]+", "", tolower(artist))
@lelandbatey
lelandbatey / whiteboardCleaner.md
Last active June 16, 2024 13:44
Whiteboard Picture Cleaner - Shell one-liner/script to clean up and beautify photos of whiteboards!

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"

Results