Skip to content

Instantly share code, notes, and snippets.

View vermiculus's full-sized avatar
🙃
I may be slow to respond.

Sean Allred vermiculus

🙃
I may be slow to respond.
View GitHub Profile
\nonstopmode \input expl3-generic \relax \ExplSyntaxOn % -*- expl3 -*-
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\file_input:n { obj }
\obj_new:nn { rectangle }
{
size: int = 2,
name: tl,
\nonstopmode \input expl3-generic \relax \ExplSyntaxOn % -*- expl3 -*-
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\file_input:n { obj2 }
\obj_new:nn { rectangle }
{
size: int = 2,
name: tl,
@vermiculus
vermiculus / eml.sh
Created July 6, 2015 03:18
Turn a directory full of emails into timestamped org entries
for f in `ls *.eml`; do
eml_date=`grep Date: $f | head -n 1 | sed 's/.*, \(.*\) +.*/\1/'`
#gtouch -d "$eml_date" $f #update timestamp
org_date=`date -j -f '%e %b %Y %T' "$eml_date" "+[%Y-%m-%d %H:%M:%S]"`
echo "* $org_date `grep From: $f | head -n 1 | sed 's/.*: \(.*\)/\1/'`"
cat $f
done
\nonstopmode \input expl3-generic \relax \ExplSyntaxOn % -*- expl3 -*-
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\file_input:n { d2 }
\bye
(require 'package)
;; Add MELPA before initialization
(add-to-list
'package-archives
'("melpa" . "http://melpa.org/packages/") t)
(package-initialize)
;; Bootstrap `use-package'

Use Jekyll and Disqus for your blog? Have you noticed how the Disqus section takes up the entire width of the page? Ugly!

Thankfully, there's a super easy way to fix this such that it will match the rest of your site. Add the wrapper class to the disqus_thread in your universal include code:

-<div id="disqus_thread"></div>
+<div id="disqus_thread" class="wrapper"></div>

That's it! Your comments section will now match the default width the rest of your site uses.

(defun expl3-spacify-paragraph (begin end)
"Convert all spaces to tildes between BEGIN and END.
If the region is not active, the current paragraph is used."
(interactive (if (region-active-p)
(list (region-beginning)
(region-end))
(save-excursion
(mark-paragraph)
(forward-word 1)
(forward-word -1)
(defun tmp:four* (&rest l)
(when (< (apply #'min l) 0)
(error "All elements must be positive"))
(string-to-number
(apply
#'concat
(nreverse
(sort (mapcar #'number-to-string l)
#'string-lessp)))))
(defun tmp:to-string (base to-power)
(when (< 0 to-power)
(concat
(tmp:to-string base (1- to-power))
(number-to-string
(* base to-power)))))
(defun tmp:do-concat (base to-power)
(string-to-number
(tmp:to-string
LOGOS = emacs-sx tex-sx
all:
test -e reddit-alien.png || wget --quiet 'https://www.redditstatic.com/about/assets/reddit-alien.png'
@$(foreach f,$(LOGOS),printf 'Processing %s\n' $(f); arara $(f); printf 'Converting... '; convert -density 1200 $(f).pdf -resize 440x500 $(f).png; printf 'done.\n';)
clean:
rm *.log *.pdf *.aux *.png