mirror of
https://github.com/alexanderepstein/Bash-Snippets
synced 2018-11-08 02:59:35 +01:00
682 lines
12 KiB
Groff
682 lines
12 KiB
Groff
.\" generated with Ronn/v0.7.3
|
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
|
.
|
|
.TH "BASH\-SNIPPETS" "1" "July 2017" "" ""
|
|
.
|
|
.SH "NAME"
|
|
\fBbash\-snippets\fR \- A collection of small bash scripts for heavy terminal users
|
|
.
|
|
.SH "Tools"
|
|
.
|
|
.SS "Cheat"
|
|
Description: Cheatsheets for quick information about multiple programming languages along with terminal commands
|
|
.
|
|
.P
|
|
Usage: cheat [flags] [command] or cheat [flags] [programming language] [subject]
|
|
.
|
|
.IP "\(bu" 4
|
|
\-s Does a search for last argument rather than looking for exact match
|
|
.
|
|
.IP "\(bu" 4
|
|
\-i Case insensitive search
|
|
.
|
|
.IP "\(bu" 4
|
|
\-b Word boundaries in search
|
|
.
|
|
.IP "\(bu" 4
|
|
\-r Recursive search
|
|
.
|
|
.IP "\(bu" 4
|
|
\-u Update Bash\-Snippet Tools
|
|
.
|
|
.IP "\(bu" 4
|
|
\-h Show the help
|
|
.
|
|
.IP "\(bu" 4
|
|
\-v Get the tool version
|
|
.
|
|
.IP "" 0
|
|
.
|
|
.P
|
|
Special Pages:
|
|
.
|
|
.IP "\(bu" 4
|
|
hello Describes building the hello world program written in the language
|
|
.
|
|
.IP "\(bu" 4
|
|
list This lists all cheatsheets related to previous arg if none it lists all cheatsheets
|
|
.
|
|
.IP "\(bu" 4
|
|
learn Shows a learn\-x\-in\-minutes language cheat sheet perfect for getting started with the language
|
|
.
|
|
.IP "\(bu" 4
|
|
1line A collection of one\-liners in this language
|
|
.
|
|
.IP "\(bu" 4
|
|
weirdness A collection of examples of weird things in this language
|
|
.
|
|
.IP "" 0
|
|
.
|
|
.P
|
|
Examples:
|
|
.
|
|
.IP "\(bu" 4
|
|
cheat rust hello
|
|
.
|
|
.IP "\(bu" 4
|
|
cheat \-r \-b \-i go
|
|
.
|
|
.IP "\(bu" 4
|
|
cheat julia Functions
|
|
.
|
|
.IP "\(bu" 4
|
|
cheat \-i go operators
|
|
.
|
|
.IP "" 0
|
|
.
|
|
.SS "Cloudup"
|
|
Description: Backs up a users github repositories to your bitbucket account\. With no flags cloudup will guide you through backing up a single repository
|
|
.
|
|
.P
|
|
Usage: cloudup [flags] or cloudup [flags] [listOfGHRepoNamesSplitBySpaces]
|
|
.
|
|
.IP "\(bu" 4
|
|
\-p Upload the repositor(y)(ies) as private to bitbucket (must have private repo ability on bitbucket)
|
|
.
|
|
.IP "\(bu" 4
|
|
\-a Backup all github repositories
|
|
.
|
|
.IP "\(bu" 4
|
|
\-s Only backup repositories that you have created (no forks) (only works in conjunction with the \-a flag)
|
|
.
|
|
.IP "\(bu" 4
|
|
\-t Backup the repository with a timestamp added to the repostiory name (will always create a new unique bitbucket repo)
|
|
.
|
|
.IP "\(bu" 4
|
|
\-u Update Bash\-Snippet Tools
|
|
.
|
|
.IP "\(bu" 4
|
|
\-h Show the help
|
|
.
|
|
.IP "\(bu" 4
|
|
\-v Get the tool version
|
|
.
|
|
.IP "" 0
|
|
.
|
|
.P
|
|
Examples:
|
|
.
|
|
.IP "\(bu" 4
|
|
cloudup
|
|
.
|
|
.IP "\(bu" 4
|
|
cloudup \-p \-a
|
|
.
|
|
.IP "\(bu" 4
|
|
cloudup \-p nameOfRepo1 nameOf Repo2
|
|
.
|
|
.IP "\(bu" 4
|
|
cloudup nameOfRep
|
|
.
|
|
.IP "" 0
|
|
.
|
|
.SS "Crypt"
|
|
Description: A wrapper around openssl that facilitates encrypting and decrypting files\.
|
|
.
|
|
.P
|
|
Usage: crypt [flag] [inputFile] [outputFile]
|
|
.
|
|
.IP "\(bu" 4
|
|
\-e Encrypt the inputFile and store it in the outputFil
|
|
.
|
|
.IP "\(bu" 4
|
|
\-d Decrypt the inputFile and store it in the outputFil
|
|
.
|
|
.IP "\(bu" 4
|
|
\-u Update Bash\-Snippet Tools
|
|
.
|
|
.IP "\(bu" 4
|
|
\-h Show the help
|
|
.
|
|
.IP "\(bu" 4
|
|
\-v Get the tool version
|
|
.
|
|
.IP "" 0
|
|
.
|
|
.P
|
|
Examples:
|
|
.
|
|
.IP "\(bu" 4
|
|
crypt \-e mySecretFile\.txt myEncryptedFile\.jpg (change filetype so default program is incorrect)
|
|
.
|
|
.IP "\(bu" 4
|
|
crypt \-d myEncryptedFile\.jpg thisIsNowDecrypted\.txt (change filetype back so now default program is correct)
|
|
.
|
|
.IP "" 0
|
|
.
|
|
.SS "CryptoCurrency"
|
|
Description: A realtime cryptocurrency converter\. With no flags it will guide you through the cryptocurrency exchange
|
|
.
|
|
.P
|
|
Usage: cryptocurrency or cryptocurrency [flag] or cryptocurrency [base] [exchangeTo] [amount]
|
|
.
|
|
.IP "\(bu" 4
|
|
\-u Update Bash\-Snippet Tools
|
|
.
|
|
.IP "\(bu" 4
|
|
\-h Show the help
|
|
.
|
|
.IP "\(bu" 4
|
|
\-v Get the tool version
|
|
.
|
|
.IP "" 0
|
|
.
|
|
.P
|
|
Supported Base Currencies:
|
|
.
|
|
.P
|
|
| BTC | ETH | XRP | LTC | | XEM | ETC | DASH | MIOTA | | XMR | STRAT |
|
|
.
|
|
.P
|
|
Supported Target Currencies:
|
|
.
|
|
.P
|
|
| AUD | BRL | CAD | CHF | | CNY | EUR | GBP | HKD | | IDR | INR | JPY | KRW | | MXN | RUB | USD |
|
|
.
|
|
.P
|
|
Examples: cryptocurrency BTC USD 12\.35 cryptocurrency
|
|
.
|
|
.SS "Currency"
|
|
Description: A realtime currency converter\. With no flags it will guide you through the currency exchange
|
|
.
|
|
.P
|
|
Usage: currency or currency [flag] or currency [base] [exchangeTo] [amount]
|
|
.
|
|
.IP "\(bu" 4
|
|
\-u Update Bash\-Snippet Tools
|
|
.
|
|
.IP "\(bu" 4
|
|
\-h Show the help
|
|
.
|
|
.IP "\(bu" 4
|
|
\-v Get the tool version
|
|
.
|
|
.IP "" 0
|
|
.
|
|
.P
|
|
Supported Currencies:
|
|
.
|
|
.P
|
|
| AUD | BGN | BRL | CAD | | CHF | CNY | CZK | DKK | | EUR | GBP | HKD | HRK | | HUF | IDR | ILS | INR | | JPY | KRW | MXN | MYR | | NOK | NZD | PHP | PLN | | RON | RUB | SEK | SGD | | THB | TRY | USD | ZAR |
|
|
.
|
|
.P
|
|
Examples:
|
|
.
|
|
.IP "\(bu" 4
|
|
currency EUR USD 12\.35
|
|
.
|
|
.IP "\(bu" 4
|
|
currency
|
|
.
|
|
.IP "" 0
|
|
.
|
|
.SS "Geo"
|
|
Description: Provides quick access for wan, lan, router, dns, mac, and ip geolocation data
|
|
.
|
|
.P
|
|
Usage: geo [flag]
|
|
.
|
|
.IP "\(bu" 4
|
|
\-w Returns WAN IP
|
|
.
|
|
.IP "\(bu" 4
|
|
\-l Returns LAN IP(s)
|
|
.
|
|
.IP "\(bu" 4
|
|
\-r Returns Router IP
|
|
.
|
|
.IP "\(bu" 4
|
|
\-d Returns DNS Nameserver
|
|
.
|
|
.IP "\(bu" 4
|
|
\-m Returns MAC address for interface\. Ex\. eth0
|
|
.
|
|
.IP "\(bu" 4
|
|
\-g Returns Current IP Geodata
|
|
.
|
|
.IP "" 0
|
|
.
|
|
.P
|
|
Examples:
|
|
.
|
|
.IP "\(bu" 4
|
|
geo \-g
|
|
.
|
|
.IP "\(bu" 4
|
|
geo \-wlrdgm eth0
|
|
.
|
|
.IP "" 0
|
|
.
|
|
.P
|
|
Custom Geo Output => [all] [query] [city] [region] [country] [zip] [isp]
|
|
.
|
|
.P
|
|
Example: geo \-a 8\.8\.8\.8 \-o city,zip,isp
|
|
.
|
|
.IP "\(bu" 4
|
|
\-o [options] Returns Specific Geodata
|
|
.
|
|
.IP "\(bu" 4
|
|
\-a [address] For specific ip in \-s
|
|
.
|
|
.IP "\(bu" 4
|
|
\-v Returns Version
|
|
.
|
|
.IP "\(bu" 4
|
|
\-h Returns Help Screen
|
|
.
|
|
.IP "\(bu" 4
|
|
\-u Updates Bash\-Snippets
|
|
.
|
|
.IP "" 0
|
|
.
|
|
.SS "Movies"
|
|
Description: Provides relevant information about a certain movie\.
|
|
.
|
|
.P
|
|
Usage: movies [flag] or movies [movieToSearch]
|
|
.
|
|
.IP "\(bu" 4
|
|
\-u Update Bash\-Snippet Tools
|
|
.
|
|
.IP "\(bu" 4
|
|
\-h Show the help
|
|
.
|
|
.IP "\(bu" 4
|
|
\-v Get the tool version
|
|
.
|
|
.IP "\(bu" 4
|
|
\-d Show detailed information
|
|
.
|
|
.IP "" 0
|
|
.
|
|
.SS "Newton"
|
|
Description: Performs numerical calculations all the way up to symbolic math parsing\.
|
|
.
|
|
.P
|
|
Usage: newton [operation] [expression] or newton [flag]
|
|
.
|
|
.IP "\(bu" 4
|
|
\-u Update Bash\-Snippet Tools
|
|
.
|
|
.IP "\(bu" 4
|
|
\-h Show the help
|
|
.
|
|
.IP "\(bu" 4
|
|
\-v Get the tool version
|
|
.
|
|
.IP "" 0
|
|
.
|
|
.P
|
|
Valid Symbols: + add \- subtract [ left parenthesis (you must use brackets bash has a bultin for parenthesis) ] right parenthesis (you must use brackets bash has a bultin for parenthesis) * multiply / divide ^ power : between the range of left and right side (only for area under curve) ~ parameter on right side (only for area, tangent line and log)
|
|
.
|
|
.P
|
|
Examples:
|
|
.
|
|
.IP "\(bu" 4
|
|
movies Argo
|
|
.
|
|
.IP "\(bu" 4
|
|
movies Inception
|
|
.
|
|
.IP "" 0
|
|
.
|
|
.SS "Qrify"
|
|
Usage: qrify [stringtoturnintoqrcode]
|
|
.
|
|
.P
|
|
Description: Converts strings or urls into a qr code\.
|
|
.
|
|
.IP "" 4
|
|
.
|
|
.nf
|
|
|
|
* \-u Update Bash\-Snippet Tools
|
|
|
|
* \-m Enable multiline support
|
|
|
|
* \-h Show the help
|
|
|
|
* \-v Get the tool version
|
|
.
|
|
.fi
|
|
.
|
|
.IP "" 0
|
|
.
|
|
.P
|
|
Examples:
|
|
.
|
|
.IP "" 4
|
|
.
|
|
.nf
|
|
|
|
* qrify this is a test string
|
|
|
|
* qrify \-m two\e\e\e\enlines
|
|
|
|
* qrify github\.com # notice no http:// or https:// this will fail
|
|
.
|
|
.fi
|
|
.
|
|
.IP "" 0
|
|
.
|
|
.SS "Short"
|
|
Description: Unmasks shortended urls\.
|
|
.
|
|
.P
|
|
Usage: short [shortURL] or short [flag]
|
|
.
|
|
.IP "\(bu" 4
|
|
\-u Update Bash\-Snippet Tools
|
|
.
|
|
.IP "\(bu" 4
|
|
\-h Show the help
|
|
.
|
|
.IP "\(bu" 4
|
|
\-v Get the tool version
|
|
.
|
|
.IP "" 0
|
|
.
|
|
.P
|
|
Example:
|
|
.
|
|
.IP "\(bu" 4
|
|
Input: short tinyurl\.com/jhkj
|
|
.
|
|
.IP "\(bu" 4
|
|
Output: http://possiblemaliciouswebsiteornot\.com
|
|
.
|
|
.IP "" 0
|
|
.
|
|
.SS "Siteciphers"
|
|
Description: Checks the available ciphers for the SSL of an https site\.
|
|
.
|
|
.P
|
|
Usage: siteciphers [flag] or siteciphers [optionalDFlag] [website]
|
|
.
|
|
.IP "\(bu" 4
|
|
\-u Update Bash\-Snippet Tools
|
|
.
|
|
.IP "\(bu" 4
|
|
\-h Show the help
|
|
.
|
|
.IP "\(bu" 4
|
|
\-v Get the tool version
|
|
.
|
|
.IP "\(bu" 4
|
|
\-d Set the delay between requests sent to the site (default is 1 sec)
|
|
.
|
|
.IP "" 0
|
|
.
|
|
.P
|
|
Examples:
|
|
.
|
|
.IP "\(bu" 4
|
|
siteciphers github\.com
|
|
.
|
|
.IP "\(bu" 4
|
|
siteciphers \-d 0\.75 google\.com
|
|
.
|
|
.IP "" 0
|
|
.
|
|
.SS "Stocks"
|
|
Description: Finds the latest information on a certain stock\.
|
|
.
|
|
.P
|
|
Usage: stocks [flag] or stocks [company/ticker]
|
|
.
|
|
.IP "\(bu" 4
|
|
\-u Update Bash\-Snippet Tools
|
|
.
|
|
.IP "\(bu" 4
|
|
\-h Show the help
|
|
.
|
|
.IP "\(bu" 4
|
|
\-v Get the tool version
|
|
.
|
|
.IP "" 0
|
|
.
|
|
.P
|
|
Examples:
|
|
.
|
|
.IP "\(bu" 4
|
|
stocks AAPL
|
|
.
|
|
.IP "\(bu" 4
|
|
stocks Tesla
|
|
.
|
|
.IP "" 0
|
|
.
|
|
.SS "Taste"
|
|
Description: A recommendation engine that provides 3 similar items based on some input topic\. Taste also has the ability to provide information on the item of interest\. Supports: shows, books, music, artists, movies, authors, games
|
|
.
|
|
.P
|
|
Usage: taste [flag] [item]
|
|
.
|
|
.IP "\(bu" 4
|
|
\-i Get more information on similar items
|
|
.
|
|
.IP "\(bu" 4
|
|
\-s Get information on the item itself
|
|
.
|
|
.IP "\(bu" 4
|
|
\-u Update Bash\-Snippet Tools
|
|
.
|
|
.IP "\(bu" 4
|
|
\-h Show the help
|
|
.
|
|
.IP "\(bu" 4
|
|
\-v Get the tool version
|
|
.
|
|
.IP "" 0
|
|
.
|
|
.P
|
|
Examples:
|
|
.
|
|
.IP "\(bu" 4
|
|
taste \-i Kendrick Lamar
|
|
.
|
|
.IP "\(bu" 4
|
|
taste Catcher in the Ry
|
|
.
|
|
.IP "\(bu" 4
|
|
taste \-s Red Hot Chili Peppers
|
|
.
|
|
.IP "" 0
|
|
.
|
|
.SS "Todo"
|
|
Description: A simplistic commandline todo list\.
|
|
.
|
|
.P
|
|
Usage: todo [flags] or todo [flags] [arguments]
|
|
.
|
|
.IP "\(bu" 4
|
|
\-c Clear all the current tasks
|
|
.
|
|
.IP "\(bu" 4
|
|
\-r Remove the following task number
|
|
.
|
|
.IP "\(bu" 4
|
|
\-g Get the current tasks
|
|
.
|
|
.IP "\(bu" 4
|
|
\-a Add the following task
|
|
.
|
|
.IP "\(bu" 4
|
|
\-u Update Bash\-Snippet Tools
|
|
.
|
|
.IP "\(bu" 4
|
|
\-h Show the help
|
|
.
|
|
.IP "\(bu" 4
|
|
\-v Get the tool version
|
|
.
|
|
.IP "" 0
|
|
.
|
|
.P
|
|
Examples:
|
|
.
|
|
.IP "\(bu" 4
|
|
todo \-a My very first task
|
|
.
|
|
.IP "\(bu" 4
|
|
todo \-r 1
|
|
.
|
|
.IP "\(bu" 4
|
|
todo \-g
|
|
.
|
|
.IP "\(bu" 4
|
|
todo \-c
|
|
.
|
|
.IP "" 0
|
|
.
|
|
.SS "Weather"
|
|
Description: Provides a 3 day forecast on your current location or a specified location\. With no flags Weather will default to your current location\.
|
|
.
|
|
.P
|
|
Usage: weather or weather [flag] or weather [country] or weather [city] [state]
|
|
.
|
|
.IP "\(bu" 4
|
|
weather [i] get weather in imperial units
|
|
.
|
|
.IP "\(bu" 4
|
|
weather [m] get weather in metric units
|
|
.
|
|
.IP "\(bu" 4
|
|
weather [Moon] grabs the phase of the moon
|
|
.
|
|
.IP "\(bu" 4
|
|
\-u Update Bash\-Snippet Tools
|
|
.
|
|
.IP "\(bu" 4
|
|
\-h Show the help
|
|
.
|
|
.IP "\(bu" 4
|
|
\-v Get the tool version
|
|
.
|
|
.IP "" 0
|
|
.
|
|
.P
|
|
Examples:
|
|
.
|
|
.IP "\(bu" 4
|
|
weather
|
|
.
|
|
.IP "\(bu" 4
|
|
weather Tokyo
|
|
.
|
|
.IP "\(bu" 4
|
|
weather Moon
|
|
.
|
|
.IP "\(bu" 4
|
|
weather m
|
|
.
|
|
.IP "" 0
|
|
.
|
|
.SS "Ytview"
|
|
Description: Search and play youtube videos right from the terminal\.
|
|
.
|
|
.P
|
|
Usage: ytview [flag] [string] or ytview [videoToSearch]
|
|
.
|
|
.IP "\(bu" 4
|
|
\-s Searches youtube
|
|
.
|
|
.IP "\(bu" 4
|
|
\-c Shows the latest videos of a channel
|
|
.
|
|
.IP "\(bu" 4
|
|
\-u Update Bash\-Snippet Tools
|
|
.
|
|
.IP "\(bu" 4
|
|
\-h Show the help
|
|
.
|
|
.IP "\(bu" 4
|
|
\-v Get the tool version
|
|
.
|
|
.IP "" 0
|
|
.
|
|
.P
|
|
Examples:
|
|
.
|
|
.IP "\(bu" 4
|
|
ytview \-s Family Guy Chicken Fight
|
|
.
|
|
.IP "\(bu" 4
|
|
ytview \-c Numberphile
|
|
.
|
|
.IP "" 0
|
|
.
|
|
.SH "Updating"
|
|
With any of the installed tools you can automate the update by running it with the \-u option or passing in update as the arguments
|
|
.
|
|
.IP "\(bu" 4
|
|
stocks update
|
|
.
|
|
.IP "" 0
|
|
.
|
|
.P
|
|
or
|
|
.
|
|
.IP "\(bu" 4
|
|
stocks \-u
|
|
.
|
|
.IP "" 0
|
|
.
|
|
.P
|
|
This will clone the repository and install the new versions of scripts that were installed, if you didn\'t install a certain tool this script will not install the new version of that tool\.
|
|
.
|
|
.SH "Uninstalling"
|
|
If you don\'t have the Bash\-Snippets folder anymore clone the repository: git clone https://github\.com/alexanderepstein/Bash\-Snippets`
|
|
.
|
|
.P
|
|
cd into the Bash\-Snippets directory: \fBcd Bash\-Snippets\fR
|
|
.
|
|
.IP "" 4
|
|
.
|
|
.nf
|
|
|
|
To go through a guided uninstall
|
|
.
|
|
.fi
|
|
.
|
|
.IP "" 0
|
|
.
|
|
.IP "\(bu" 4
|
|
\&\./uninstall\.sh
|
|
.
|
|
.IP "" 0
|
|
.
|
|
.SH "AUTHOR"
|
|
Alexander Epstein Github: https://github\.com/alexanderepstein
|
|
.
|
|
.SH "Contributors"
|
|
Jake Meyer Github: https://github\.com/jakewmeyer
|
|
.
|
|
.P
|
|
Linyos Torovoltos Github: https://gitbub\.com/linyostorovovoltos
|
|
.
|
|
.SH "License"
|
|
MIT License
|
|
.
|
|
.P
|
|
Copyright (c) 2017 Alex Epstein
|
|
.
|
|
.P
|
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
.
|
|
.P
|
|
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software\.
|
|
.
|
|
.P
|
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT\. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE\.
|