Skip to content

Instantly share code, notes, and snippets.

@adonh
adonh / stardate.el
Last active January 28, 2026 01:46
Emacs stardate.el --- insert stardate into a file --- (C) 1988 by Mark W. Eichin
;;; stardate.el --- insert stardate into a file -*- lexical-binding: t -*-
;; Copyright (C) 1988 Mark W. Eichin
;; Author: Mark W. Eichin <eichin@athena.mit.edu>
;; This file is not part of GNU Emacs.
;; 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
@adonh
adonh / bc.el
Last active January 28, 2026 01:46
bc shell buffer for Emacs (C) 1996 by mjchan@cs.cmu.edu
;;; bc.el --- bc shell buffer -*- lexical-binding: t -*-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Copyright (C) 1996 Ming-Jen Chan (mjchan@cs.cmu.edu)
;
; File: bc.el
; RCS: $Header: g:/home/mjchan/lib/lisp/comint-hack/RCS/bc.el,v 1.4 1997-06-16 09:38:35-04 mjchan Exp mjchan $
; Abstract: make a shell buffer running bc
; Author: Ming-Jen Chan (mjchan@cs.cmu.edu)
; Created: Mon Jun 09 10:07:33 1997
@adonh
adonh / get-focus-mode.js
Created December 28, 2025 20:56 — forked from drewkerr/get-focus-mode.js
Read the current Focus mode on macOS Monterey (12.0+) using JavaScript for Automation (JXA)
const app = Application.currentApplication()
app.includeStandardAdditions = true
function getJSON(path) {
const fullPath = path.replace(/^~/, app.pathTo('home folder'))
const contents = app.read(fullPath)
return JSON.parse(contents)
}
function run() {
@adonh
adonh / hax.sh
Created December 19, 2025 06:51 — forked from iGlitch/hax.sh
macOS provisioning, hardening, tweaking, whatever script - no more phone home
#!/bin/bash
# Let's "secure" even the script for you :)
sudo -v
function ok() {
echo -e "[OK] "$1
}
function bot() {