Skip to content

Instantly share code, notes, and snippets.

Avatar

Dan Leslie dleslie

View GitHub Profile
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
(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 encfs.sh
#!/bin/bash
encfs --idle=10 --anykey --extpass="ssh-askpass Enter your EncFS Password" /home/dleslie/Dropbox/.crypt/ /home/dleslie/Documents/
thunar /home/dleslie/Documents/
View encfs.sh
#!/bin/bash
encfs --idle=10 --anykey --extpass="ssh-askpass Enter your EncFS Password" /home/dleslie/Dropbox/.crypt/ /home/dleslie/Documents/
thunar /home/dleslie/Documents/
View encfs.sh
#!/bin/bash
encfs --idle=10 --anykey --extpass="ssh-askpass Enter your EncFS Password" \
/home/dleslie/Dropbox/.crypt/ /home/dleslie/Documents/
thunar /home/dleslie/Documents/
@dleslie
dleslie / .emacs
Created Oct 2, 2011
Fix Quack's Font Facing to be Friendly
View .emacs
(custom-set-faces
'(quack-about-face ((t (:inherit font-lock-warning))))
'(quack-about-title-face ((t (:inherit font-lock-warning :weight bold :height 2.0))))
'(quack-banner-face ((t (:inherit font-lock-warning-face))))
'(quack-pltfile-dir-face ((t (:inherit dired-face-directory))))
'(quack-pltfile-file-face ((t (:inherit dired-face-file ))))
'(quack-pltfile-prologue-face ((((class color)) (:inherit dired-face-boring))))
'(quack-pltish-class-defn-face ((((class color) (background dark)) (:inherit font-lock-type-face))))
'(quack-pltish-colon-keyword-face ((t (:inherit font-lock-keyword-face))))
'(quack-pltish-comment-face ((((class color) (background dark)) (:inherit font-lock-comment-face))))
View scheme-c-mode.el
(require 'multi-mode)
(defun scheme-c-mode ()
"Mode for editing C embedded in Scheme, using multi-mode."
(interactive)
(set (make-local-variable 'multi-alist)
'((scheme-mode)
(c-mode . scheme-c-header-region)
(c-mode . scheme-c-inline-region)))
(multi-mode-install-modes))
@dleslie
dleslie / getmp3
Created Dec 12, 2011
wget converter from flac to mp3
View getmp3
#!/bin/bash
for link in `cat list.txt`; do
fname=`echo $link | awk -F"/" '{print $5}'`
wget -c --limit-rate=500k $link -qO - | flac -cd - | lame -h - "$fname.mp3"
sleep 120
done