Skip to content

Instantly share code, notes, and snippets.

View dleslie's full-sized avatar

Dan Leslie dleslie

View GitHub Profile
@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)
(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)
#!/bin/bash
encfs --idle=10 --anykey --extpass="ssh-askpass Enter your EncFS Password" /home/dleslie/Dropbox/.crypt/ /home/dleslie/Documents/
thunar /home/dleslie/Documents/
#!/bin/bash
encfs --idle=10 --anykey --extpass="ssh-askpass Enter your EncFS Password" /home/dleslie/Dropbox/.crypt/ /home/dleslie/Documents/
thunar /home/dleslie/Documents/
#!/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 October 2, 2011 19:57
Fix Quack's Font Facing to be Friendly
(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))))
(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 December 12, 2011 00:25
wget converter from flac to mp3
#!/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