Safety First

Be careful — this code might be very evil! Only compile and run this program if you trust me and the code herein.

signed checksums and gpg signatures are included in every package for security. Here is an example of using the GNU Privacy Guard to verify the integrity of a program.

palindrome

Check phrases for palindrominess!

Give it a Spin





Quick Start


Clone, compile, run

# clone
git clone https://github.com/lbeckman314/palindrome
cd palindrome

# compile
g++ src/palindrome.cpp -o palindrome

# run
./palindrome




Installation

For an example of installation, see here.

0. Prerequisites

g++ :: for compiling the program.

git :: for a quick git clone.

If you have a propensity against git, check out the alternative installation. In which case wget or curl can be helpful for downloading the necessary files. gpg and sha256sum can be used to verify the integrity of the files.

If you are running Windows, the above utilities will be packaged in any of the following: babun, cmder, or Linux Subsystem for Windows. Take your pick! : )

The above utilities should be installed (or readily available) if you are running a Unix derivative (such as Linux, macOS, or any of the BSD’s).

1. Quickstart

# clone the git repo
git clone https://github.com/lbeckman314/palindrome

# enter directory
cd palindrome

# compile
g++ palindrome.cpp -o palindrome.out

# run
./palindrome.out


Uninstallation

0. Delete the directory/folder.

rm -rfI palindrome



Example

please enter your sentence
user input: abccba
abccba
bccb
cc
Your string is a palindrome! Palindrome = true




Alternative Installation


1. Download

wget http://www.liambeckman.com/pkgs/palindrome/palindrome.tar.gz
# or if you prefer curl:
# curl http://www.liambeckman.com/pkgs/palindrome/palindrome.tar.gz -o palindrome.tar.gz


Optional (but recommended): verify file integrity

#-------------------------------#
# RECIEVE GPG KEYS
#-------------------------------#

gpg --keyserver pgp.mit.edu --recv-keys AC1CC079

#-------------------------------#
# RECIEVE SHA256SUMS
#-------------------------------#

wget http://www.liambeckman.com/pkgs/palindrome/sha256sums.txt{,.asc}
# or if you prefer curl:
# curl http://www.liambeckman.com/pkgs/palindrome/sha256sums.txt{,.asc} -o sha256sums.txt -o sha256sums.txt.asc

#-------------------------------#
# VERIFY SHA256SUMS
#-------------------------------#

gpg --verify sha256sums.txt.asc

# gpg: signature made Tue Oct 31 11:11:11 2017 PDT using RSA key ID AC1CC079
# gpg: Good signature from "liam beckman ("I only want to live in peace, plant potatoes, and dream!" -Tove Jansson) <lbeckman314@gmail.com>" [unknown]

#-------------------------------#
# VERIFY FILE INTEGRITY
#-------------------------------#

sha256sum -c sha256sums.txt 2>/dev/null | grep palindrome.tar.gz

# palindrome.tar.gz: OK

#-------------------------------#
# OPTIONALLY REMOVE PUBLIC KEY
#-------------------------------#

# to remove my public key from your public key ring, simply
gpg --delete-key AC1CC079


2. Extract

tar -zxvf palindrome.tar.gz
# or if you downloaded the zip file
# unzip palindrome.zip


3. Compile and run

g++ src/palindrome.cpp -o palindrome
./palindrome



Uninstallation


1. Delete the directory/folder.

rm -rfI palindrome