Skip to content

Instantly share code, notes, and snippets.

@ckopsa
ckopsa / chatgpt-spell-check.el
Last active January 4, 2024 18:57
Uses chatgpt-shell to make spelling and grammar fixes
(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
@lazy
lazy / init.el
Last active December 15, 2023 05:14
(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)
@thriveth
thriveth / init.el
Created October 28, 2022 01:41
minimal-ish Emacs config to work with Bibliographies and references
(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)
@tadhgboyle
tadhgboyle / x86-m1.md
Last active July 23, 2024 21:10
running x86_64 `.ova` VMs on an m1 mac
  • install homebrew if you have not already

    • /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  • install qemu

    • brew install qemu
  • extract the .ova file

    • tar -xvf /path/to/ova
@asmeurer
asmeurer / svg2pdf.bash
Last active August 18, 2023 12:02 — forked from s417-lama/svg2pdf.bash
Reliable way to convert an SVG file to a PDF file using headless Chrome
#!/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
@wbowling
wbowling / CVE-2019-18634.py
Last active September 8, 2020 23:03
POC for CVE-2019-18634
#!/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) {
@Neo23x0
Neo23x0 / Base64_CheatSheet.md
Last active July 5, 2024 17:29
Learning Aid - Top Base64 Encodings Table

Base64 Patterns - Learning Aid

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)
@bburky
bburky / 2018 podcast CPEs.ipynb
Last active March 21, 2020 15:41
Podcast CPEs
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@defensivedepth
defensivedepth / logstash-osquery-shipped-WEL.conf
Created December 21, 2018 17:14
Logstash configuration snippet for Windows eventlogs shipped by the osquery table windows_events
filter {
json {
# Do the initial JSON parse
source => "message"
target => "osquery"
}
mutate {
# Remove the \\x0A
@jrelo
jrelo / megaraid_status.py
Created August 22, 2018 14:32
megaraid_status.py
#!/usr/bin/python
# $Id: megaclisas-status,v 1.52 2015/04/18 02:49:07 root Exp root $
#
# Written by Adam Cecile <gandalf@NOSPAM.le-vert.net>
# Modified vy Vincent S. Cojot <vincent@NOSPAM.cojot.name>
#
import os
import re
import sys