Skip to content

Instantly share code, notes, and snippets.

View cmoore's full-sized avatar
🆑

Clint Moore cmoore

🆑
View GitHub Profile
(defun i/refresh-imap (login password server)
(let ((iconn (make-imap :port 993
:host server
:ssl-p t)))
(cmd-connect iconn)
(cmd-login iconn login password)
(cmd-select iconn "inbox")
(mapcar (lambda (x)
(parse-fetch-fields
@cmoore
cmoore / parenscript_oh_snap.lisp
Created June 19, 2012 04:17
parenscript shows me how little I really know so far about CL
(defpsmacro $ (selector &body chains)
`(chain (j-query ,selector)
,@chains))
; Clearly, this did not work like I expected...
(defpsmacro jq-submit (element function)
`(let ((td (concatenate 'string "#" ,element)))
(($ (@ td) ,function))))
/home/cmoore/bins/ghc-7.4.1/lib/ghc-7.4.1/package.conf.d:
Cabal-1.14.0
array-0.4.0.0
base-4.5.0.0
bin-package-db-0.0.0.0
binary-0.5.1.0
bytestring-0.9.2.1
containers-0.4.2.1
deepseq-1.3.0.0
directory-1.1.0.2
module Main where
import qualified Data.ByteString.Char8 as B
import Data.Tree.NTree.TypeDefs
import Data.Maybe
import Text.XML.HXT.XPath
import Text.XML.HXT.Core
import Control.Monad
import Control.Monad.Trans
; clm.el
; because I like to switch machines... constantly it seems.
(defmacro ext-with-file-exists (file block)
"Execute the form if the file exists."
`(and (file-exists-p ,file)
(progn ,block)))
;;
;; If the file exists, execute the block.
;;
;;
;; My SEKRET SETTINGS OMG
;;(ext*with-file-exists-f "~/Dropbox/.github.config.el"
;; (load "~/Dropbox/.github.config.el"))
;;
(defmacro ext-with-file-exists (file block)
; my biggest gripe with twittering-mode
; is relatively minor.
(defun ext-twittering-mode-redraw-with-updated-fill-column ()
(interactive)
(kill-buffer (current-buffer))
(twit))
;; two-mode-mode.el -- switches between tcl and sgml(html) modes
;; $Id: two-mode-mode.el,v 1.4 2004/11/19 17:00:12 davidw Exp $
;; Copyright 1999-2004 The Apache Software Foundation
;; Licensed under the Apache License, Version 2.0 (the "License");
;; you may not use this file except in compliance with the License.
;; You may obtain a copy of the License at
;; http://www.apache.org/licenses/LICENSE-2.0
@cmoore
cmoore / irccloud.css
Created December 6, 2011 00:58
irccloud
#buffer div.scroll div.messageRow span.message {
font-family: "Ubuntu Mono", Monaco, Consolas, monospace;
font-size: 14px;
}
#buffer div.scroll span.date {
font-family: "Ubuntu Mono", Monaco, Consolas, monospace;
}
(let ((gmod-have-package (featurep 'package)))
(defun gmod-install-url-as-elisp (url)
(let ((buf (url-retrieve-synchronously url)))
(save-excursion
(set-buffer buf)
(goto-char (point-min))
(re-search-forward "^$" nil 'move)
(eval-region (point) (point-max))
(kill-buffer (current-buffer)))))