Skip to content

Instantly share code, notes, and snippets.

View darrik's full-sized avatar

Rikard Glans darrik

  • Sweden
  • 04:13 (UTC +02:00)
View GitHub Profile
# Usage:
# [sudo] gem install mechanize
# ruby tumblr-photo-ripper.rb
require 'rubygems'
require 'mechanize'
# Your Tumblr subdomain, e.g. "jamiew" for "jamiew.tumblr.com"
site = "doctorwho"
(defadvice newline-and-indent (after darrik-nai-curly-special activate)
"Do something special when RET between {}."
(when (eq (char-after) ?\})
(let ((pos (point)))
(if (search-backward "{")
(progn
(goto-char pos)
(newline)
(indent-according-to-mode)
(previous-line)