Skip to content

Instantly share code, notes, and snippets.

Donald Curtis milkypostman

Block or report user

Report or block milkypostman

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@milkypostman
milkypostman / badwolf-theme.el
Created Nov 10, 2014
badwolf theme attempt
View badwolf-theme.el
;;; badwolf-theme.el --- Emacs 24 theme with a dark background.
;; Copyright (C) 2014 , d@milkbox.net
;; Author: d@milkbox.net
;;
;; Version: 0.1
;; Package-Requires: ((emacs "24"))
;; Created with emacs-theme-generator, https://github.com/mswift42/theme-creator.
View after.el
(defmacro after (mode &rest body)
"`eval-after-load' MODE evaluate BODY."
(declare (indent defun))
(let ((load-arg (cond
((consp mode) mode)
((symbolp mode) `(quote ,mode))
(t mode))))
`(eval-after-load ,load-arg
'(progn ,@body))))
@milkypostman
milkypostman / ignore-wiki.el
Last active Dec 20, 2015
Ignore wiki packages from MELPA
View ignore-wiki.el
;; ignore wiki packages
(defadvice package--add-to-archive-contents
(around package-filter-wiki-packages (package archive) activate compile)
(unless (string-match-p "\\[wiki\\]$" (package-desc-doc (cdr package)))
ad-do-it))
View gifinate
#!/bin/bash
if [[ $# < 1 ]]; then
echo "Requires an argument."
exit 1
fi
if [[ ! -r $1 ]]; then
echo "File not found: ${1}"
View grizzl-ubiquitous.el
(defun to-string (object)
"Convert OBJECT to a string."
(cond
((symbolp object) (symbol-name object))
((stringp object) object)
((numberp object) (number-to-string object))
(t (prin1-to-string object))))
(defadvice completing-read (around grizzl-advise-completing-read activate)
"Wrapper that uss grizzl"
View gist:5657937
(cl-loop for (source-file . dest-file) in files
for info-path = (expand-file-name
(concat (file-name-sans-extension dest-file)
".info")
target-dir)
if (string-match ".texi\\(nfo\\)?$" source-file)
if (not (file-exists-p info-path))
do (ignore-errors
(pb/run-process
nil
View gist:5645206
(defadvice require (around require-advice activate)
(message "require")
(save-excursion
(let (deactivate-mark)
ad-do-it)))
View *scratch*.el
(let ((prev 0)
(cur)
(str (concat (propertize "test" 'face 'mode-line) " -- " (propertize "rest" 'face 'default)))
(out '(0)))
(while (setq cur (next-single-property-change prev 'face str))
(message (substring str prev cur))
(setq prev cur)
)
(message (substring str prev)))
View init.el
(defun save-region-or-current-line (arg)
(interactive "P")
(if (region-active-p)
(kill-ring-save (region-beginning) (region-end))
(copy-line arg)))
View tedcompile.py
#!/usr/bin/env python
import os
import py_compile
import shutil
import stat
import sys
import zipfile
You can’t perform that action at this time.