Programming


Use SSH Keys with Git

Use SSH Keys with Git

If you want to use ssh keys with git you need to do these simple steps. Once you’ve set things up, ssh keys are very easy to use and much safer than passwords. Here are the summary steps of using ssh keys with git: Generate ssh key Add Key to Github Web Account Tell Your SSH client to ...

Check Open Ports with Powershell

Check Open Ports with Powershell

A client wanted a quick script to generate noise for the SIEM team to review. This powershell script will check a list of ports over and over, generating plenty of noise. I modified a colleagues script to be a bit more user friendly, have colors, and to specify a shorter timeout. ...

'optiPNG' vs 'PNGcrush' vs 'Gimp' to Reduce PNG Size

‘optiPNG’ vs ‘PNGcrush’ vs ‘Gimp’ to Reduce PNG Size

Which is better? NEITHER! optipng and pngcrush are dated tools, but they are free, and surprisingly still work. Here are some comparisons on compression levels on a PNG file vs the same file as JPG format.

Basic Git Tutorial Crash Course

Basic Git Tutorial Crash Course

Git is a code repository. It allows you to save versions of code and collaborate remotely using github.com. Here are the basics of how to use git: Basic Requirements You will need the following: a Git Hub Account a Code Repository a git client to talk to the repository Examples in this document are using random push ...

Basic tkinter usage for Python 3

Basic tkinter usage for Python 3

I am offering a job online and was flooded with applicants. I needed a way to cut and paste the data and then save it for later processing. Lessons in this Tutorial tkinter basics Classes Basic flow control in loops Python Dictionaries List Splicing json writes Regex Field validation Grid layout in tkinter Tkinter or tkinter? Among the most popular gui frameworks for python such as ...

Verify SSL Expiration with Python 3

Verify SSL Expiration with Python 3

If you’ve ever had a need to verify multiple SSL certificates for expiration times in a batch and wanted to script it in Python, you’ll find this article interesting. When I try to solve a problem, programatically, I usually start with the “what makes sense” question. In this case, the SSL cert main problem ...

Read and Write JSON File Python 3

Read and Write JSON File Python 3

JSON data is a pretty common format, especially if you work with API. Many popular APIs will give or expect to get data in JSON format. Here is how to read and write JSON data files with Python 3. What is JSON? In the most simple form, JSON is a text file containing data. ...

Compile Perl Script Using PAR

Compile Perl Script Using PAR

PAR allows you to make your Perl scripts portable. It will allow them to bundle with the interpreter, any DLLs, and all modules required to simply pass around your exe. How to Install PAR This is tested on Strawberry Perl, Windows 10. YMMV. Installing PAR will require a few other modules first. Please ...

Count Lines in CSV Using Perl

Count Lines in CSV Using Perl

We have hundreds of CSV files, and need to know how many lines are in each one. A simple way to count lines in a CSV file is to open it, update your line count, then close it. CSV Output Count Example Counted Lines in CSV files Shell Counting lines in files combined1.csv,13875256 combined2.csv,1234 combined3.csv,144 combined4.csv,13801 DONE!! 3 wallclock secs ( ...

Reorder Text With Perl Split and Splice

Reorder Text With Perl Split and Splice

We were hired to edit some transcriptions. The transcriptions were in different formats. Sometimes the “time” was first, and sometimes the “who” was first. Here is one way to reorder text programatically. Original Text to Reorder The client gave us text in the format of “who”,”when”,”what was said” Shell Female: '00.0s' "Hello!" Male: ...