Skip to content

Instantly share code, notes, and snippets.

View cmoore's full-sized avatar
🆑

Clint Moore cmoore

🆑
View GitHub Profile
class TimelineController < ApplicationController
def index
@messages = Message.order("status_id DESC")
@newest_id = newest_id
end
# Just do a simple update to the timeline for the latest
# greatest messages.
#
# 1. Pull 100 messages
(ql:quickload 'hunchentoot)
(ql:quickload 'cl-who)
(ql:quickload 'routes)
(ql:quickload 'css-lite)
(defpackage :rss-view
(:use :cl :hunchentoot :cl-who :css-lite)
(:export :rss-start :rss-stop))
(in-package :rss-view)
(defun clm*flymake-colors ()
(custom-set-faces
'(flymake-errline ((((class color)) (:underline "Red"))))
'(flymake-warnline ((((class color)) (:underline "Orange"))))))
(load (expand-file-name "~/emacs/haskell-mode/haskell-site-file.el"))
(require 'inf-haskell)
(load (expand-file-name "~/clones/ghc-mod/elisp/ghc"))
(add-hook 'haskell-mode-hook (lambda nil
(clm*flymake-colors)
@cmoore
cmoore / ghc-pkg.el
Created November 25, 2011 09:33
Autoloader for package.el for emacs > 24
(let ((gmod-have-package (featurep 'package)))
(defun gmod-install-package-el ()
(let (buf (url-retrieve-synchronously
"http://git.savannah.gnu.org/cgit/emacs.git/plain/lisp/emacs-lisp/package.el"))
(save-excursion
(set-buffer buf)
(goto-char (point-min))
(re-search-forward "^$" nil 'move)
(eval-region (point) (point-max))
(kill-buffer (current-buffer)))))
(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)))))
@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;
}
;; 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
; my biggest gripe with twittering-mode
; is relatively minor.
(defun ext-twittering-mode-redraw-with-updated-fill-column ()
(interactive)
(kill-buffer (current-buffer))
(twit))
;; 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)
; 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)))
;;