Skip to content

Instantly share code, notes, and snippets.

View mlapshin's full-sized avatar
🦖
I'm too old for this shit

Mike Lapshin mlapshin

🦖
I'm too old for this shit
  • Health Samurai
  • Manhattan Beach, CA
View GitHub Profile
(defun extract-translation (start end)
(interactive "r")
(if (region-active-p)
(let* ((text (buffer-substring start end))
(keyname (read-string "Key name: " (extract-translation-default-key-name text)))
(short-keyname (car (last (split-string keyname "\\.") 1)))
(rails-root (if (fboundp 'ffip-project-root)
(ffip-project-root)
(projectile-project-root)))
@mlapshin
mlapshin / run_tags.rb
Last active December 18, 2015 07:49
run ctags git hook
#!/usr/bin/env ruby
#-*-ruby-*-
# A script to run ctags on all .rb files in a project. Can be run on
# the current dir, called from a git callback, or install itself as a
# git post-merge and post-commit callback.
CTAGS = '/usr/bin/ctags.emacs24'
HOOKS = %w{ post-merge post-commit post-checkout }
HOOKS_DIR = '.'