Category Archives: BASH Shell

Auto Added by WPeMatico

Mac Devs – Pro Tip: Add Real Colors to bash.

If you have a new mac, and you are used to linux like me you probably are annoyed that all the colors in the shell are the same.

Of course, mac does have colors in the shell… However, they do not reflect if what you are looking at.

For Example, can you tell me from looking at the following which if a file, directory, and which is executable?

Where as once the script given below is ran it will look like the following:

Clearly you can see the file is white, the script is red because its executable, and the directories are a light blue. This can all be customized of course, but I find the defaults pretty good.

To Install these changes is quite easy, and I even made a script that can be ran without downloading. Simply run the following to make the changes and restart your terminal.

bash < <(curl -sSl

Please don’t take my word for what the script does, I highly recommend that you look at the script before if you don’t trust it. Just use the URL in the curl for reference. Its very simple.

ChatGPT and DevOps

Integrating ChatGPT within DevOps automation can streamline and enhance various aspects of your development and operations processes. Here are some ideas for utilizing ChatGPT in your DevOps workflows:

  1. Automated Troubleshooting and Diagnostics:
  • Create a chatbot interface that developers and operations teams can use to diagnose and troubleshoot issues in real-time. ChatGPT can provide suggestions and solutions based on the symptoms and error messages provided.
  1. Incident Management and Response:
  • Integrate ChatGPT into your incident management system to help with initial incident triage and resolution. It can provide relevant documentation, runbooks, and even suggest actions to take based on historical incident data.
  1. Release Notes Generation:
  • Automatically generate release notes by summarizing the changes made in code commits and providing a human-readable format for communication between development and operations teams.
  1. Infrastructure Provisioning and Scaling:
  • Use ChatGPT to create a conversational interface for provisioning and scaling infrastructure. Developers and operations teams can describe their requirements, and ChatGPT can generate the necessary infrastructure-as-code (IaC) scripts.
  1. ChatOps for Continuous Integration/Continuous Deployment (CI/CD):
  • Enable ChatGPT to interact with your CI/CD pipeline. Developers can trigger builds and deployments, monitor progress, and receive notifications through a chat interface.
  1. Code Review Assistance:
  • Improve the code review process by having ChatGPT provide automated code analysis and suggestions for improvements. It can assist in identifying potential issues, coding standards violations, and security vulnerabilities.
  1. Documentation Generation:
  • Automatically generate documentation for new features, APIs, or infrastructure changes based on code comments, commit messages, and chat interactions with developers.
  1. ChatOps for ChatOps:
  • Use ChatGPT to enhance your existing ChatOps workflows. It can help automate tasks within your ChatOps platform, making it easier to manage other aspects of your DevOps automation.
  1. Security and Compliance Checks:
  • Integrate ChatGPT into your security and compliance automation processes. It can assist in scanning code for vulnerabilities, checking configurations for compliance, and recommending fixes.
  1. Natural Language Alerts and Notifications:
    • Enable ChatGPT to provide natural language alerts and notifications for system events and monitoring data. This can make it easier for team members to understand and respond to critical incidents.
  2. Capacity Planning and Forecasting:
    • Utilize ChatGPT to analyze historical data and make predictions for capacity planning, resource allocation, and scaling decisions.
  3. Onboarding and Training:
    • Develop a chatbot-driven onboarding process for new team members, helping them get up to speed with your DevOps practices and tools.
  4. Chat-Based Reporting and Analytics:
    • Allow team members to request reports and analytics on various aspects of your DevOps processes through a chat interface, making data-driven decisions more accessible.

Remember to carefully plan and secure the integration of ChatGPT into your DevOps automation, considering access controls, data privacy, and the potential impact of automation on your workflows. Additionally, continuously monitor and update the system to ensure it remains effective and aligned with your evolving DevOps needs.


When you are not sure who is using SUDO on a server, and you really need to know who keeps making that annoying change.  You can install something to watch them, and maintain that software and related logs. Keep it setup in your package management system, and make sure it doesn’t have any patches.


You could use the little-known (at least those I have asked in the field) modifications I will list below.  They are two fold.  One, you will enable to record who logs in and uses SUDO, and records their session. Much like many pieces of software out there today.  The one catch to my method is simple.  You already have the software installed, yup this has been a feature of SUDO since version 1.7.4p4.  So nothing else to install, worry about, or maintain.  It is also very easy to setup, see below:

/etc/sudoers modifcation:
All you need to do is to add 2 tags to all required sudoers entries.
*(where "su" specified, either with command or alias). 

It will add the following default log dir structure to sudoers: Defaults iolog_dir=/var/log/sudo-io/%{user}
Output is logged to the directory specified by the iolog_dir option (/var/log/sudo-io by default) using a unique session ID that is included in the normal sudo log line, prefixed with TSID=.  The iolog_file option may be used to control the format of the session ID.  Output logs may be viewed with the
sudoreplay(8) utility, which can also be used to list or search the available logs.   Keeping in mind that if the user has a really long session you will be viewing it like a movie, it will replay as if he is sitting there typing.  With this in mind, sudoreplay gives you the ability to play back at faster speeds.  This makes it easier to find where things happened in a long recording.

So that is one good method to help find a culprit, but what if you are just looking at history of root?  Can you tell me who ran what? Can you tell me when they ran the commands you see when you type ‘history’?  By default, no.  The next tidbit of info is very useful, and extremely easy to add to your machines.  Simply add the following to your /etc/profile:

export HISTTIMEFORMAT="%m.%d.%y %T "

Yes, that is a space at the end.  If you do not put that in there you will end up with it running together with the actual command typed in history.  So your history should look like the example below:

1995 06.10.15 13:08:05 top
1996 06.10.15 13:08:05 clear
1997 06.10.15 13:08:05 df -h
1998 06.10.15 13:08:05 umount /media
1999 06.10.15 13:08:05 sudo umount /media
2000 06.10.15 13:08:05 sudo su –
2001 06.10.15 13:08:07 history

I hope this helps someone save some time, as it has me.  Please feel free to share with others.



Linux Gaming just got way better!

Since the release of ProtonDB, there have been over 2500 games added to Linux!

What is Proton?

Proton is a new tool released by Valve Software that has been integrated with Steam Play to make playing Windows games on Linux as simple as hitting the Play button within Steam. Underneath the hood, Proton comprises other popular tools like Wine and DXVK among others that a gamer would otherwise have to install and maintain themselves. This greatly eases the burden for users to switch to Linux without having to learn the underlying systems or losing access to a large part of their library of games. Proton is still in its infancy so support is inconsistent, but regularly improving.

ProtonDB is used to collaborate on performance on different hardware/software configurations. Allowing the community to work together to get the games working.

Setting Up Proton in STEAM – Tested Ubuntu 18.10

How to use a PS1 in Linux/MAC

Here are the PS1‘s I use for my daily driver.  Feel free to take them and change them up.

I use different colors, so one doesn’t accidentally login or run something as root (which is in red, users are yellow).

To use these, simply copy and paste them into either the root user; or regular user’s .bashrc.

Alternatively you can add them to /etc/profile to make them enforced system wide. 

For MAC, it is the same; however the PS1 is a little different. See below.





Using Nano with Markdown in Linux

Fan of nano?  Like having pretty colors to see where you messed up? Of course we do!  Much like many of us, I use nano.  Its quick, easy, and readily available.  However, I like to see the highlighting of my language.  As many of you know, there are “nanorc” files, that will tell nano how to handle language highlight.

They are usually located in  /usr/share/nano/ (at least in ubuntu); and you can make your own under your home directory with a .nanorc file.  I can post about that later…

For now let get markdown working in nano!

You will need to create a file called markdown.nanorc by doing the following:

 sudo touch /usr/share/nano/markdown.nanorc

Now that the file is created, we just need to populate it with the following below text, in a pastebin for your convenience.  Just copy that text, and paste it into the aformentioned file. Once a new session is started, you will be able to start using markdown.

Just a little note as well; if you have a need for another language, you can follow the same instructions with their pre-reated files.  Take a look here, to see other nanorc files.  Also, nano has just been updated after a very long while, please take a look at the new support when you can.




Kill Switch Pictures/Update

Hello All,

For those following along, I have moved Kill Switch, my sons e-vehicle project. To a permanent page.  I have also added a gallery for the work as I go.  Keep an eye…

You can also subscribe to my RSS if you like.



Thanks to TJUMP7 for the donated 4gb SD card, and help with the motor controllers!  I can’t wait to get all the parts and get it going!

Jasper Image Updates[Update]

I have been quietly working on the installer and image.  However, there have been 2 OS updates since I started.  So I am refreshing all of my images with Raspbian Stretch.  I will be making it available soon.  Also, if anyone has a class 10, 4GB MicroSD they want to donate. I am trying to make the image as small as possible.  Please contact me directly for details.

The new Image will be based on Raspbian Lite as mentioned above, and will have the basic dependencies met.  It will also have newer versions of all the software pre-compiled to save you the hours of time it can take.

I am working on software to auto-configure most audio devices.  This is something I hope to include soon.  Please keep an eye out for the new links.


Matthew Curry


Thank you to TJUMP7 for the 4gb Card!  Small Image coming soon!  Keep an eye out for that and the installer….


[UPDATE] 01/24/2018 – After being out for a while for personal reasons, I am glad to say I am back. I will be working on the updates/releases soon.

Handy One-Liners – Full Debian Update

This one is great for a “Full Update” on debian / ubuntu machines.

It calls the script without ever installing anything (assuming curl is installed).  Be sure to run as root, either with sudo or as root directly.

As you can see in the snippet; it uses a script that is remotely hosted (in a github gist).  This is great because you  can see exactly what it does by looking at the script.  It just calls system commands, so it can’t do anything malicious.  Just run sudo, then the above command and it will run the below script:

Another trick you can do with something like this, is copy it to  /usr/bin/fullupdate (as root of course), and ensure its executable “sudo chmod +x /usr/bin/fullupdate”.  Then you can call “sudo fullupdate”, from anywhere and use it when needed. Alternatively, you can use it on a cron to run on a schedule!  If you don’t want all the options, just download the script and change it for your liking.


Welcome to open source.

Got an Idea? Need Help? Raspberry PI prototyping!

Just another thing that I helping with lately.  If anyone need help with a new idea for a Raspberry PI, or IoT device message me.  I have been  through several POC’s (proof of concepts).

Keep in mind, if you are working on a new product; or sensitive information I keep all client info secret, and have no issues with an NDA.

  • Home Automation
  • Voice Recognition
  • Several TTS/STT Options
  • Custom Hardware
    • Integration with existing hardware
  • Custom Software
    • Custom Plugins/Adjustments
    • Coding
  • R&D on Subject Matter
    • Build
    • Test
    • Design
  • … and whatever else is needed …

Happy to just answer questions; or see what I can do to help.  Just contact me.