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
#!/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. |
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
# This is text format of the instructions shown in the below Youtube video | |
# http://www.youtube.com/watch?v=ajs9rO5upZA | |
# First get a ubuntu Live CD or USB Stick and boot from it | |
# Check all the Hard disk and Partitions using following command | |
sudo fdisk -l # Now take a note of the partition, on which linux is installed which may be like: /dev/sda1 | |
# 3. Mount the partition where you need to install GRUB 2 (Hard disk partition) | |
# Now the file system appears in nautaulis and command line is not file system of Hard disk |
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
# Login as root | |
ssh root@domain | |
# Create deploy user | |
adduser <username> #Adds User with username given. Enter Password when Prompted. Other Details are Optional | |
# Add user to sudo group | |
usermod -g <groupname> <username> | |
# Add .ssh/authorized_keys for deploy user |
NewerOlder