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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rmux () { | |
# Ask to exit if inside a tmux session | |
if [[ -n "$TMUX" ]] { echo >&2 "Exit this tmux session to avoid nesting sessions"; return 1; } fi | |
git_root="$(git rev-parse --show-toplevel || echo .)" | |
# If not a git repo assume this isn't a rails project and exit | |
if [[ $git_root == "." ]] { echo "\nNot a Git repo. Are you sure this is a rails project?"; return 1; } fi | |
# If not a rails project exit with a message |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Create a dated text file at a specific location and append text to it. | |
# | |
# Usage: | |
# $ notes something you want to jot down (appends that text to the file) | |
# $ xclip -o | notes (appends your clipboard to the file) | |
# $ notes (opens the file in your editor) | |
# | |
# This script is almost completely copied from nickjj's below project | |
# https://github.com/nickjj/notes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Standard awesome library | |
local gears = require("gears") | |
local awful = require("awful") | |
require("awful.autofocus") | |
-- added according to https://www.youtube.com/watch?v=nC_e8Gw1XlA | |
-- by sathish to enable dragging windows without title bars | |
require("collision")() | |
-- Widget and layout library | |
local wibox = require("wibox") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
call plug#begin('~/.vim/plugged') | |
" Gruvbox theme | |
Plug 'gruvbox-community/gruvbox' | |
" Papercolor theme | |
Plug 'NLKNguyen/papercolor-theme' | |
" Everforest theme | |
Plug 'sainnhe/everforest' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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. | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Logging in with command line | |
============================ | |
When password is not set with the below method. always use `sudo mysql -u root -p` for the login prompt. | |
Unless password is not set, login won't work without sudo | |
Reset password instructions here | |
================================ | |
https://stackoverflow.com/questions/16556497/how-to-reset-or-change-the-mysql-root-password/51023379#51023379 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This sophisticated script written to save those precious domain names you found | |
# after hours and hours of searching only to find out that you don't have the $10 | |
# to actually buy the domain. After you hustle your way to have $10 in your account | |
# you find out that the domain is taken. From this point on you are wondering your | |
# entire life if that is GoDaddy that actually snatched that domain from you. | |
# Worry no more. This tiny little script can save you from the tyranny of big domain tech | |
# by searching for available domain names without going through domain providers. |
I hereby claim:
- I am sathishmanohar on github.
- I am sathishmanohar (https://keybase.io/sathishmanohar) on keybase.
- I have a public key ASDyeiQJfafKUm0UVOSxj7wqs05bajJvkScji1DLfC5FTQo
To claim this, I am signing this object:
NewerOlder