Skip to content

Instantly share code, notes, and snippets.

Avatar

Dan Leslie dleslie

View GitHub Profile
View gist:9216203
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"
View gist:fa2f8f32e9a5b5e2acec
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,
View override-theme.el
(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))
View *compilation*.txt
-*- 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")
View *compilation*.txt
-*- 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 Jun 23, 2015
Function to manually trigger a revert of all buffers presently visiting a file
View gist:6565d765fe0770833466
(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)))
View color-theme-cycler.el
(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)))))
View tumblr-gist.el
(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)
View tumblr-gist.el
;; 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)
View tumblr-gist.el
(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)