Skip to content

Instantly share code, notes, and snippets.

View mplscorwin's full-sized avatar
💬
preping for EmacsConf.org

Corwin mplscorwin

💬
preping for EmacsConf.org
View GitHub Profile
#!/bin/bash
# create thumbs
rm .thumb/*-thumb.jpg # 2>/dev/null
(for f in *.jpg ; do
b=`basename "$f" .jpg`;
s=`identify "$f" | cut -d" " -f3 | perl -nle '
($width,$height) = split 'x';
die "bad size" unless $width && $height;
@mplscorwin
mplscorwin / gist:7007fc3c984da8ca3e462f32579067ee
Created April 20, 2023 16:14
yet another version of my build script
#!/usr/bin/bash
# package-emacs-master - Create Snapshot Binary Release Packages for Windows
#
# Copyright 2023 Corwin Brust <corwin@bru.st>
#
# This program is distributed under the terms of the GNU Public
# License version 3 or (at your option) any later version.
#
function url_encode {
#!/usr/bin/bash
# crude-ci - Inf loop running Emacs for Windows snapshot packaging
#
# Copyright 2023 Corwin Brust <corwin@bru.st>
#
# This program is distributed under the terms of the GNU Public
# License version 3 or (at your option) any later version.
#
# the .private file exports SSH_KEY and SSH_USER, needed for rsync
@mplscorwin
mplscorwin / build-emacs-master.sh
Last active March 30, 2023 22:48
Create Snapshot Binary Release Packages for Windows
#!/usr/bin/bash
# package-emacs-master - Create Snapshot Binary Release Packages for Windows
#
# Copyright 2023 Corwin Brust <corwin@bru.st>
#
# This program is distributed under the terms of the GNU Public
# License version 3 or (at your option) any later version.
#
# most likely things to edit
@mplscorwin
mplscorwin / gist:2a39068166a68bce9a6aa390b42ff5c5
Created October 16, 2020 07:04
tidy.el - source and patch source from EmacsWiki
;;; tidy.el --- Interface to the HTML Tidy program
;; Copyright (C) 2001, 2002, 2003 by Free Software Foundation, Inc.
;; Emacs Lisp Archive Entry
;; Filename: tidy.el
;; Author: Kahlil (Kal) HODGSON <dorge@tpg.com.au>
;; X-URL: http://www.emacswiki.org/elisp/tidy.el
;; Time-stamp: <2002-09-30 13:16:23 kahlil>
;; Version: 2.12_patch1
@mplscorwin
mplscorwin / .gnus
Created January 26, 2020 02:24
Configure Emacs to read Gmail with gnus
;; ~/.gnus
(setq gnus-select-method
'(nnimap "gmail"
(nnimap-address "imap.gmail.com") ; it could also be imap.googlemail.com if that's your server.
(nnimap-server-port "imaps")
(nnimap-stream ssl)
(nnmail-expiry-target "nnimap+gmail:[Gmail]/Trash")
(nnmail-expiry-wait immediate)))
(setq smtpmail-smtp-server "smtp.gmail.com"
@mplscorwin
mplscorwin / erc-countusers-mode
Created January 20, 2020 23:55
Can't ever remember where I stole this code. Sketchy.
;;; erc-countusers-mode.el --- display a count of channel users in the mode-string
;;; Commentary:
;; TODO: return empty string if parted/disconnected
;; TODO: add to emacswiki files
;;; Code:
(define-minor-mode ncm-mode "https://www.emacswiki.org/emacs/ErcModeline
Add this to your .emacs to see the number of opped/voiced/normal members of the
current channel in the modeline:" nil
(:eval
@mplscorwin
mplscorwin / defvar-maybe.el
Created December 20, 2019 04:40
A small utility to make developing well documented vars inline a little more trival.
;;; defvar-maybe.el --- maybe declare variables
;;; AUTHOR: Corwin Brust <corwin@bru.st>
;;; LICENSE: GPL2 or newer GNU Public License
;;; VERSION: 0.2
;;; Commentary:
;;
;; A drop-in replacement for `defvar' that substities 'setq' during "DEVEL".
;; Place the following lines into a package you are hacking on:
;; (require 'defvar-maybe)
@mplscorwin
mplscorwin / erc-frames-mode.el
Last active January 21, 2020 02:01
erc setup sequencing
;;; erc-frames-mode.el --- sequence erc setup -*- lexical-bindings:t -*-
;; Copyright (C) 2019 Corwin Brust
;; Author: Corwin Brust <corwin@bru.st>
;; URL: http://dpaste.com/3NFJV60
;; Version: 0.1-pre
;; Package-Requires: ((emacs "26.0"))
;; Keywords: ERC IRC
;; This file is not part of GNU Emacs.
@mplscorwin
mplscorwin / hide-region+.el
Last active May 11, 2023 11:46
Uploading 1.2 as pushed to EmacsWiki - getnly tested
;;; hide-region.el --- hide regions of text using overlays
;;
;; Copyright (C) 2001, 2005 Mathias Dahl
;;
;; Version: 1.0.1
;; Keywords: hide, region
;; Author: Mathias Dahl <mathias.rem0veth1s.dahl@gmail.com>
;; Maintainer: Mathias Dahl
;; URL: http://mathias.dahl.net/pgm/emacs/elisp/hide-region.el
;;