Tag Web Development

Bash Scripting

Bash Scripting

Bash is a Unix Shell and Command Language which runs in the form of a file (myscript.sh) and issues commands to the machine(s) it’s running on or connected to. Bash Scripts can save countless hours of time editing files or performing operations, so it’s quite versatile and useful.

A simple Bash Script might look something similar to this:


#!/bin/bash
# Monitor Network Connections - K0NxT3D 2021
clear

# All Connections to File
# sudo netstat -atupen >> output.txt

# Established Connections To File
# sudo netstat -atnp | grep ESTA >> output.txt

# Live Monitoring No File
sudo watch -d -n3 "netstat -atnp | grep ESTA"

The use of the pound sign at the beginning and following text is called the “Shebang” and is critical to your script environment, while also being used alone to Comment lines out in the rest of the script.
The Shebang is only used at the beginning of the script.

Scripts can be run on Linux based operating systems as well as Windows, my examples here are exclusive to Linux.

Sometimes you need a very “Personal” script to edit particular data from one or more files and might end up with something more like this processing script which gives me an output of the ip or website currently connected to my machine.


#!/bin/bash
#netstat -a -c -tp (Run As Sudo For More Details)
clear
   date=$(date +"%m-%d-%Y_%H-%M")
   file="output.txt"
   ipo='^[0-9]+([.][0-9]+)?$'
   #file="$date-netstat.output"
  touch $file
  netstat -tp|awk '{print $5}' >> $file
sleep 10
     sed -i 's/:https//' $file
     sed -i 's/:http//' $file
     sed -i 's/servers)//' $file
     sed -i 's/Address//' $file
     sed -i 's/edge-msgr-latest-//' $file
     sed -i 's/edge-star-shv-01-//' $file
     sed -i 's/localhost:netbios-ssn//' $file
     sed -i '/^\s*$/d' $file
sleep 10
   while IFS= read -r ip
do
   ping -c 1 $ip &> /dev/null && echo $ip >> IPS.txt || echo Could Not Connect.
done < $file
   rm $file

This script simply removes lines of information I don’t need from the output file it generates and cleans up my data and the mess.

Sometimes, I just wanna mess with my dogs.
FOREVER!


#!/bin/bash
i=0
   until [ $i -gt 3 ]
do
   random=$(cat /dev/urandom | tr -dc '0-9' | fold -w 4 | head -n 1)
   ffplay -f lavfi -i "sine=frequency=$random:duration=1" -autoexit -nodisp
   ((i=i-1))
done

You can always read more information here on Wikipedia.

SEAVERNS.COM - WordPress - Full Stack Cross Platform Web Development

WordPress Content Management System

WordPress is a free and open-source content management system written in PHP and paired with a MySQL or MariaDB database. Features include a plugin architecture and a template system, referred to within WordPress as Themes.

WordPress (WPWordPress.org) is a free and open-source content management system (CMS) written in PHP and paired with a MySQL or MariaDB database. Features include a plugin architecture and a template system, referred to within WordPress as Themes. WordPress was originally created as a blog-publishing system but has evolved to support other web content types including more traditional mailing lists and forums, media galleries, membership sites, learning management systems (LMS) and online stores. WordPress is used by 41.4% of the top 10 million websites as of May 2021, WordPress is one of the most popular content management system solutions in use. WordPress has also been used for other application domains, such as pervasive display systems (PDS).

WordPress was released on May 27, 2003, by its founders, American developer Matt Mullenweg and English developer Mike Little, as a fork of b2/cafelog. The software is released under the GPLv2 (or later) license.

To function, WordPress has to be installed on a web server, either part of an Internet hosting service like WordPress.com or a computer running the software package WordPress.org in order to serve as a network host in its own right. A local computer may be used for single-user testing and learning purposes.

Let’s Get You Started Using WordPress.

SEAVERNS.COM - CMS - Full Stack Cross Platform Web Development

Content Management Systems

Content Management Systems make your life easy if you’re a Web Developer or even a novice Web Designer.
A CMS allows you to get set-up a lot faster that hand coding your entire Web Site.
Most Content Management Systems come with pre-made Theme Templates and Accessories, such as Widgets, Back End Tools, Editors and Security and are easier to use than trying to sift through thousands of lines of code.

Which CMS Is Right For You?

SEAVERNS.COM - HTML Colors - Full Stack Cross Platform Web Development

Choosing Colors

Every Web Site has it’s own Character and a lot of that boils down to the Color Scheme in use.
While some Color Combinations are relatively easy on the reader,others are certainly not and you should have a Web Site that Everyone can read.

Choosing Contrasting Colors can make your Pages easy to read, but too much contrast and you’l have a headache in  no time. Always have a “Beta Group” of friends or co-workers that are wiling to critique your Web Site and it’s Color Scheme.

What’s Your Favorite Color?

SEAVERNS.COM - CSS - Full Stack Cross Platform Web Development

CSS (Cascading Style Sheets)

WHAT IS CSS?

Cascading Style Sheets (CSS) are a simple mechanism for adding style (e.g., fonts, colors, spacing) to Web documents and an amazing way to Beautify your Web Site and make it Your Own.  Most Content Management Systems come “Stock” and anyone can have that same look, so you want to be able to add your own touch to Your Web Site to set it apart and give your Viewers or Customers the Experience You want to give them.

Let’s Talk

SEO ( Search Engine Optimization )

What is SEO, why it’s Everything!!

Search Engine Optimization is what get’s you ranked and rated higher than your “competitors”.
You can have the greatest content in The Universe and nobody is going to see it if you don’t know how to properly display it.

You may want Everyone to see your Web Site or you may want to keep it as Private and Secured as possible.
These are important factors in the Development and Design of Your Web Site.

  • How well do your pages load?
  • Are your Image Files too large and bulky?
  • Proper File Formats?

These are Absolutely Important Questions, Do You Know The Answer?

Reach Out