Skip to content

Instantly share code, notes, and snippets.

View wilkes's full-sized avatar

Wilkes Joiner wilkes

View GitHub Profile
(defun twm-frame-full-screen-p ()
(frame-parameter nil 'fullscreen))
(defun twm-make-full-screen ()
(when (and (featurep 'aquamacs) (not (twm-frame-full-screen-p)))
(aquamacs-toggle-full-frame)))
(defun twm-focus-window ()
"assumes the largest window is the focus window"
(get-largest-window))
@wilkes
wilkes / my-twm.el
Created December 10, 2008 20:09
emacs window layout hacks
(require 'cl)
(defun twm-make-full-screen ()
(when (and (featurep 'aquamacs) (not (frame-parameter nil 'fullscreen)))
(aquamacs-toggle-full-frame)))
(defun twm-focus-window ()
"assumes the largest window is the focus window"
(get-largest-window))
Debugger entered--Lisp error: (wrong-type-argument stringp nil)
expand-file-name(nil)
magit-get-top-dir(nil)
magit-status(nil)
call-interactively(magit-status t nil)
execute-extended-command(nil)
call-interactively(execute-extended-command nil nil)
(ns fjord
(:import (javax.servlet.http HttpServletResponse)
(org.mortbay.jetty HttpConnection Request Server HttpException)
(org.mortbay.jetty.bio SocketConnector)
(org.mortbay.jetty.handler AbstractHandler)))
(defstruct webctx :target :request :response :dispatch)
(def *routes* (atom []))
# Make sure your run: sudo chmod u+s /usr/bin/screen
startup_message off
defscrollback 100000 # functionally infinite scrollback
# This will allow for multi-user usage
# I got all the keys off of the deployment server and added them to my 'pair' user account so no password is needed
multiuser on
# change cmd from C-a to C-z to avoid emacs conflict
escape ^zz
(ns rabbitmq
(:import (com.rabbitmq.client ConnectionParameters
ConnectionFactory
QueueingConsumer)))
(defstruct connection-info
:username :password :virtual-host :heartbeat :host :port)
(defn connect [info]
(let [connection (.newConnection (ConnectionFactory.
(ns org.buntin.github.github
(:require [org.danlarkin.json :as json])
(:import [org.apache.http.impl.client DefaultHttpClient]
[org.apache.http.client.methods HttpGet]
[org.apache.http.util EntityUtils]))
(def user "%s")
(def search "search/%s")
(def commit "%s/%s/commit/%s")
(def recent "%s/%s/commits/%s")
(defn- macosx? []
(-> "os.name" System/getProperty .toLowerCase
(.startsWith "mac os x")))
(defn- macosx? []
(.startsWith (.toLowerCase (System/getProperty "os.name"))
"mac os x"))
(require 'slime)
(slime-setup)
(require 'clojure-auto)
(require 'clojure-paredit)
(add-to-list 'auto-mode-alist '("\\.clj$" . clojure-mode))
;; These are extra key defines because I kept typing them.
;; Within clojure-mode, have Ctrl-x Ctrl-e evaluate the last
;; expression.
(try
(.createNewFile file)
(catch IOException e
(throw (Exception. (str "Failed to create " file) e))))