Skip to content

Instantly share code, notes, and snippets.

View sathishmanohar's full-sized avatar

Sathish Manohar sathishmanohar

View GitHub Profile
@sathishmanohar
sathishmanohar / examples.md
Created February 2, 2024 17:19 — forked from andynu/examples.md
Assorted rake tasks for orienting and evaluating the use of a rails app.

Overview:

rails stats:controllers  # Show basic controller usage stats
rails stats:models       # Show basic model usage stats
rails stats:trends       # show frequency trends for a date column; MODEL=x COLUMN=y
rails stats:unroutable   # Find routes that will raise a routing error when requested
rails stats:users        # Show basic details of users
@sathishmanohar
sathishmanohar / neotree-project-dir.el
Created November 3, 2022 05:20 — forked from idcrook/neotree-project-dir.el
emacs neotree and projectile: sync with projectile
;; NeoTree can be opened (toggled) at projectile project root
(defun neotree-project-dir ()
"Open NeoTree using the git root."
(interactive)
(let ((project-dir (projectile-project-root))
(file-name (buffer-file-name)))
(neotree-toggle)
(if project-dir
(if (neo-global--window-exists-p)
(progn
@sathishmanohar
sathishmanohar / show_method_history.rb
Created August 26, 2022 19:38 — forked from andynu/show_method_history.rb
Given a ruby file and method name shows you all the different versions across the git history.
#!/usr/bin/env ruby
# Given a file and method_name
# Show all the different implementations across the git history (first commit per implementation).
#
# show_method_history <file> <method_name> --html
#
# e.g. show_method_history test/test_helper.rb sign_in --html
#
# WARNING: the --html output just dumps html files into your current folder.
#