Created
November 4, 2017 17:16
-
-
Save PlanetRoast/1230ea90fb6780421a432a60af4e18f6 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# Assorted | |
# ------------------------------------ | |
# Linux alias commands for general use. | |
alias sites='cd ~/sites/' # opens the sites folder | |
alias sb='cd ~/sandbox/' # opens the sandbox folder | |
alias folder='nemo .' # opens the current directory in nemo file browser | |
alias xt='exit' # closes the terminal | |
alias sen='sensors' # shows cpu and gpu temps | |
alias ..='cd ../' # change directory to parent | |
alias ...='cd ../../' # change directory to parent of parent | |
alias andex='&& exit' # closes terminal after task | |
# Google Search | |
# --------------------------------------------------------------- | |
# Linux alias commands for launching Google via the command line. | |
# - Searching for single words can be done like this: g foobar | |
# - Searching for strings can be done like this: g 'foo bar' | |
# Standard Google search => g foobar | |
function g() { | |
xdg-open https://www.google.com/search?q="$1" && exit | |
} | |
# Feeling Lucky => gl foobar (takes you straight to the first result) | |
function gl() { | |
xdg-open "https://www.google.com/search?q=$1&btnI" && exit | |
} | |
# Youtube => tube foobar (searches youtube) | |
function tube() { | |
xdg-open https://www.youtube.com/search?q="$1" && exit | |
} | |
# Ruby on rails | |
# ------------------------------ | |
# Linux alias for Ruby on Rails. | |
alias rs='rails s' # starts the rails server | |
alias rgm='rails g migration' # generates migration | |
alias rgc='rails g controller' # generates controller | |
alias rgs='rails g scaffold' # generates scaffold | |
alias rrdm='rake db:migrate' # migrates the database | |
# Opening localhost in your browser (lh3 => localhost:3000, lh4 => localhost:4000) | |
function lh() { | |
xdg-open http://localhost:"$1"000 && exit | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment