Skip to content

Instantly share code, notes, and snippets.

@rayortigas
rayortigas / exporting-formatted-code-snippets-from-emacs
Created May 29, 2014
Stuff for exporting formatted code snippets from Emacs using Pygments.
View exporting-formatted-code-snippets-from-emacs
;; Stuff for exporting formatted code snippets using Pygments
;; <http://pygments.org/>. Install pygments (e.g. pip install
;; pygments) to use.
(setq pygmentize-lexers (make-hash-table))
(puthash 'emacs-lisp-mode "common-lisp" pygmentize-lexers)
(puthash 'scala-mode "scala" pygmentize-lexers)
(puthash 'java-mode "java" pygmentize-lexers)
(puthash 'ruby-mode "rb" pygmentize-lexers)
(puthash 'python-mode "py" pygmentize-lexers)
View gist:4490968
# config/environments/development.rb
Hello::Application.configure do
# ...
# https://rails.lighthouseapp.com/projects/8994/tickets/4676-reload-routes-on-each-request-in-dev-mode
service_reloader = ActiveSupport::FileUpdateChecker.new(Dir["app/services/**"]) { Rails.application.reload_routes! }
config.to_prepare do
service_reloader.execute_if_updated