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 chatgpt-shell-check-and-correct-paragraph () | |
"Check and correct the current paragraph using ChatGPT." | |
(interactive) | |
(let* ((bounds (bounds-of-thing-at-point 'paragraph)) | |
(start (car bounds)) | |
(end (cdr bounds)) | |
(original-text (buffer-substring-no-properties start end)) | |
(point-offset (- end (point))) ; Save the offset of point from end | |
(checked-text (chatgpt-shell-check-paragraph original-text))) | |
(when checked-text |
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
#!/bin/bash | |
# whisper-stream.sh | |
# | |
# Take a url supported by yt-dlp, dump 30-second segments to the current | |
# directory named by unix timestamp, and transcribe each segment using Whisper. | |
# | |
# example: TZ=Australia/Canberra ./whisper-stream.sh "https://..." | |
# | |
# The time displayed is the time when ffmpeg first opens the segment for |
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
(use-package vertico-posframe | |
:config | |
(setq vertico-posframe-parameters | |
'((left-fringe . 8) | |
(right-fringe . 8))) | |
(setq vertico-posframe-border-width 3) | |
:init | |
(vertico-posframe-mode) |
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
(require 'package) | |
(add-to-list 'package-archives | |
'("melpa" . "https://melpa.org/packages/") t) | |
(package-initialize) | |
(require 'use-package) | |
(setq custom-file (expand-file-name "emacs-custom.el" user-emacs-directory)) | |
(load custom-file) |
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
#!/bin/bash | |
# | |
# Convert an SVG file to a PDF file by using headless Chrome. | |
# | |
if [ $# -ne 2 ]; then | |
echo "Usage: ./svg2pdf.bash input.svg output.pdf" 1>&2 | |
exit 1 | |
fi |
Unless otherwise noted (either in this file or in a file's copyright section) the contents of this gist are Copyright ©️2020 by Christopher Allen, and are shared under spdx:Creative Commons Attribution Share Alike 4.0 International (CC-BY-SA-4.) open-source license.
If you more tips and advice like these, you can become a monthly patron on my GitHub Sponsor Page for as little as $5 a month; and your contributions will be multipled, as GitHub is matching the first $5,000! This gist is all about Homebrew, so if you like it you can support it by donating to them or becoming one of their Github Sponsors.
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/python | |
import os | |
import pty | |
from pwn import process, sleep, write, read, listen, p64 | |
""" | |
From https://github.com/sudo-project/sudo/blob/SUDO_1_8_30/src/tgetpass.c#L401: | |
} else if (c == sudo_term_kill) { |
Base64 Code | Mnemonic Aid | Decoded* | Description |
---|---|---|---|
JAB |
🗣 Jabber | $. |
Variable declaration (UTF-16), e.g. JABlAG4AdgA for $env: |
TVq |
📺 Television | MZ |
MZ header |
SUVY |
🚙 SUV | IEX |
PowerShell Invoke Expression |
SQBFAF |
🐣 Squab favorite | I.E. |
PowerShell Invoke Expression (UTF-16) |
SQBuAH |
🐣 Squab uahhh | I.n. |
PowerShell Invoke string (UTF-16) e.g. Invoke-Mimikatz |
PAA |
💪 "Pah!" | <. |
Often used by Emotet (UTF-16) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder