Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View dleslie's full-sized avatar

Dan Leslie dleslie

View GitHub Profile
git config --global alias.lg "log --color --graph --pretty=format:'%C(auto)%h%Creset -%C(auto)%d%Creset %s %Cgreen(%cr)%C(bold blue)<%an>%Creset' --abbrev-commit"
@dleslie
dleslie / gist:fa2f8f32e9a5b5e2acec
Created October 15, 2014 00:55
glxinfo for i915
name of display: :0.0
display: :0 screen: 0
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.4
server glx extensions:
GLX_ARB_create_context, GLX_ARB_create_context_profile,
GLX_ARB_fbconfig_float, GLX_ARB_framebuffer_sRGB, GLX_ARB_multisample,
GLX_EXT_create_context_es2_profile, GLX_EXT_framebuffer_sRGB,
GLX_EXT_import_context, GLX_EXT_texture_from_pixmap, GLX_EXT_visual_info,
(defun override-theme (arg)
"Disables all enabled themes and then loads the provided theme."
(interactive
(list
(intern (completing-read "Load custom theme: "
(mapcar 'symbol-name (custom-available-themes))))))
(while custom-enabled-themes
(disable-theme (car custom-enabled-themes)))
(load-theme arg t))
-*- mode: compilation; default-directory: "~/Workspace/code/dleslie/monad-egg/" -*-
Compilation started at Sat May 2 07:58:01
chicken-install -test
retrieving ...
checking platform for `monad' ...
checking dependencies for `monad' ...
mapped (srfi-1 srfi-1) to ()
install order:
("monad")
-*- mode: compilation; default-directory: "~/Workspace/code/dleslie/monad-egg/" -*-
Compilation started at Sat May 2 07:59:56
chicken-install -test
retrieving ...
checking platform for `monad' ...
checking dependencies for `monad' ...
mapped (srfi-1 srfi-1) to ()
install order:
("monad")
@dleslie
dleslie / gist:6565d765fe0770833466
Created June 23, 2015 16:18
Function to manually trigger a revert of all buffers presently visiting a file
(defun revert-all-buffers ()
"Reverts all buffers that are visiting a file."
(interactive)
(mapcar
(lambda (buf)
(with-current-buffer buf
(when (buffer-file-name)
(revert-buffer t t t))))
(buffer-list)))
@dleslie
dleslie / color-theme-cycler.el
Created February 16, 2010 22:29
Color Theme Cycler
(require 'color-theme)
(setq color-theme-is-global t)
(load "zenburn.el")
(setq color-theme-list
'(color-theme-calm-forest color-theme-zenburn color-theme-billw color-theme-calm-forest color-theme-goldenrod color-theme-dark-blue2 color-theme-robin-hood color-theme-gray30 color-theme-shaman color-theme-gnome2 color-theme-charcoal-black))
(defun cycle-color-theme-list ()
(setq color-theme-list (append (cdr color-theme-list) (list (car color-theme-list)))))
(require 'gist)
(require 'tumblr)
(require 'http-post-simple)
(defun tumblr-gist-region (begin end &optional private)
"Post the current region as a new paste in a blog post"
(interactive "r\nP")
(gist-region begin end private 'tumblr-gist-callback))
(defun tumblr-gist-callback (status)
;; Copyright 2010 Dan Leslie <dan@ironoxide.ca>
;; You can redistribute it and/or modify it under the terms of the GNU
;; General Public License as published by the Free Software Foundation;
;; either version 3, or at your option any later version.
(require 'gist)
(require 'tumblr)
(require 'http-post-simple)
(defun tumblr-gist-region (begin end &optional private)
(require 'gist)
(require 'tumblr)
(require 'http-post-simple)
(defun tumblr-gist-region (begin end &optional private)
"Post the current region as a new paste in a blog post"
(interactive "r\nP")
(gist-region begin end private 'tumblr-gist-callback))
(defun tumblr-gist-callback (status)