Skip to content

Instantly share code, notes, and snippets.

Avatar
💬
preping for EmacsConf.org

Corwin mplscorwin

💬
preping for EmacsConf.org
View GitHub Profile
@mplscorwin
mplscorwin / gist:2a39068166a68bce9a6aa390b42ff5c5
Created Oct 16, 2020
tidy.el - source and patch source from EmacsWiki
View gist:2a39068166a68bce9a6aa390b42ff5c5
;;; 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 Jan 26, 2020
Configure Emacs to read Gmail with gnus
View .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 Jan 20, 2020
Can't ever remember where I stole this code. Sketchy.
View erc-countusers-mode
;;; 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 Dec 20, 2019
A small utility to make developing well documented vars inline a little more trival.
View defvar-maybe.el
;;; 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 Jan 21, 2020
erc setup sequencing
View erc-frames-mode.el
;;; 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 Nov 29, 2019
Uploading 1.2 as pushed to EmacsWiki - getnly tested
View hide-region+.el
;;; 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
;;
@mplscorwin
mplscorwin / erc-burnt-toast.el
Last active Feb 18, 2020
WIndows 10 Notification Center Support for erc-match
View erc-burnt-toast.el
;;; erc-burnt-toast.el --- erc-match support for w32 notification center -*- lexical-binding: t; -*-
;; Copyright (C) 2019 Corwin Brust
;; Author: Corwin Brust <corwin@bru.st>
;; URL: https://bru.st
;; Version: 0.1-pre
;; Package-Requires: ((emacs "26.0"))
;; Keywords: irc erc burnt-toast
@mplscorwin
mplscorwin / .emacs
Last active Jan 22, 2020
My very message init script for gnu emacs 26.3 on windows
View .emacs
;;; init --- Emacs startup script
;;; Commentary:
;;;; Corwin Brust <corwin@bru.st>
;;;; huge thankx to Aaron Bedra for http://aaronbedra.com/emacs.d/
;;; Code:
(setq user-full-name "Corwin Brust")
(setq user-mail-address "corwin@bru.st")
;; https://github.com/wyuenho/dotfiles/blob/master/.emacs
@mplscorwin
mplscorwin / gist:8445328
Created Jan 15, 2014
fix ownership of cassandra's files when someone goes and runs it other than from "service start cassandra" (CentOS 6)
View gist:8445328
#!/bin/bash
################################################################################
#
# shell script to fix ownership of all files under each entry in SEARCH_PATH
#
# Change SEARCH_PATH as needed.
# NOTE: script has no output if it does no work.
#
################################################################################
@mplscorwin
mplscorwin / statsd_init.sh
Last active Jan 3, 2016 — forked from garlandkr/statsd_init.sh
this version (which I use on CentOS as /etc/init.d/statsd) mimics more closely the "normal" sysV service control script behavior.
View statsd_init.sh
#!/bin/sh
### BEGIN INIT INFO
# Provides: statsd
# Required-Start: $local_fs $remote_fs $network $syslog
# Required-Stop: $local_fs $remote_fs $network $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: control statsd
# Description: start/stop/restart statsd using nodejs forever