Category Archives: dev

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 https://gist.githubusercontent.com/MattCurryCom/6348692ffd9903d249907fb5212056d5/raw/080810de0caa9e0bdf70741104ab6bec1b2a8929/mac-linux-colors.sh)

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.

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.

 

Root

 

User

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.

Thanks,

Matthew Curry

[UPDATE]

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.

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.

Building E-Vehicle/Robot for Son!

I am building a robot (named aptly: Kill Switch) from old parts I had laying around, and it is powered by hub motors from a ‘hover-board’.  The stats were pretty strong for small kids; so I am building a lot of safety into it.

This will include software, and hardware measures to ‘take over’ the device, and even limit speed.  Eventually I will be able to return him back to a certain spot with playtime is over.  I hope to automated charging as well eventually.  There are a lot of features I have ready; however I am still building out the hardware.

This can be difficult to do and keep extremely safe.  So for starters I am testing it only; and I have 2 kill switches I am putting in to ensure safety.  One the person will have to keep his foot on constantly for the buggy to run.  The other is a simple quick kill switch.  (Eventually these will be automated).

The Device already has an RPI3 with a small motor-controller for future automation’s.  This will control other aspects of the vehicle via software.  Such as speed limitations, power usage, GPS, WIFI, BT.  I will also be using a pico router to establish a LAN around the device.  This is for media, as the vehicle will have speakers/screen to watch/host media on the LAN.

Hardware Safety Features:

  • Dash Kill Switch
  • Foot Kill Switch
  • Flip/Tilt Sensor
  • Lights
  • Front
  • Rear

Once testing is completed, and it works; I will go through how I set it up.  However, this will be piece by piece as I do it.  I have even considered some youtube videos.  However, that will depend on my success in doing this on a budget.  I am also using completely reclaimed parts, minus a couple bolts I bought.  So its been free so far.

On that note, I have been building the chassis, but if anyone in the Dallas, TX area has an old go-cart frame that rolls/steers, I am looking.  I think it would make it a lot lighter.  Shoot me a message, info is on my contact me page.

 

MUCH More to come… Please keep an eye on the series…

-M

Don’t forget! Linux Learning Resources

This is kept under the Linux Learning Project and Learning Resources section of the site, and is updated occasionally with new links.  Feel free to suggest one by contacting me directly.


LEARNING RESOURCES

Help/Chat:

Resources:

Need DevOps Help?

  • Had issues with your DevOps pipeline?
  • Need help streamlining automation or configuration management?
  • Need to green field or “lift and shift” applications into the cloud?

If you are trying to do any of these, and running into issues please contact me.  I am now open to consulting directly.  Fixing even a few small inefficiencies can have a huge impact on the bottom line.  Not only that, if the DevOps philosophies are really taken up, its likely that the employee base will also be happier, and proud of their accomplishments as a team.

As far as technologies I support, please take a look at my Technologies page.  (Updated often)  I am also happy to take on new ones for a project if needed.

Creating an efficient pipeline is what I do; and a fully functional system that is working well can be an amazing thing.

 

Matthew Curry
MattCurry.Com

 

Thank you to all… Jasper v1.6 Image News!

First, I would like to say thank you to the community members for helping out. I have gotten a lot of input on the new image.  This has also given me better feel for what the community wanted in an image. Which leads me to the next bit of news.


Some of you are undoubtedly wondering why I have not released my Jasper v1.6 image as of yet.  Well, I can assure you there are very good reasons.

Firstly,  I have had some severe family/health issues come up as of late which take priority.  I am also in the middle of moving a family of 5.  Combine that with the other reasons below, and I feel that most will feel the wait to be worth it.

This leads me to the next bit of news, however shocking it may be.

  1.  There will be no version 1.6 image.
    1. There will be no image at all…
  2.  Instead, there will be a full installer.
    1. This is one of the reasons for the delay.
  3.   The installer will work with a full GUI, and on the desktop.
    1. Examples:
      1. Full ubuntu Install.
      2. Fresh RPI install with GUI.
  4. The installer will be iterated on by feature going forward.
    1. We can add community approved features one at a time.
      1. Example:
        1. Change Jaspers Name
        2. Change STT after setup
        3. Etc.

FAQ (COMING SOON)

  • So whats that mean for me?
  • What do I do if I am running Jasper v.15?
  • Where do I get the installer?
  • Do I need to upgrade?

 

Jasper Polling Results for Image v1.6

  • Results of the Polls:
  • Presetup profile.yml enabled
  • GUI packages will be left on the devices
    • Increasing Size Dramatically
    • Increasing Update Time Dramatically
  • Jasper will not be pre-installed
    • There will be an installer with options
    • Daemon off by default
  • Home Assistant will be pre-installed
    • Daemon off by default
    • Mosquito MQTT Server installed with it

 


Would you prefer to have the profile.yml presetup as in v1.5?
  • Yes: 9
  • No: 0
Do you want GUI option, even though its not suggested?
  • Yes: 5
  • No, it will break: 2
Should v1.6 Have Jasper Already Installed?
  • Yes:  2
  • No:  1
  • I want installer:  7
Should HomeAssistant be included in v1.6?
  • Yes:  4
  • No:  1
  • Whats that?:  1

A few BASH tips from an old Linux admin.

Everyone has seen these “Top 50 commands” blah blah blah….. #clickbait….

I am writing this just to make BASH a much more pleasant experience for people new and old to Linux.  It is also for any sysadmin that has simply not been introduced to some of them.

I could list tons of them, but that’s going to get a simple TL;DR for most people.  Then they will move on.  So I will list a few and lets let those digest.  Keep in mind all commands are in Linux, and may vary by distribution.

First BASH tips (Simple, but time savers):

  1.  Type ‘cd’ and you will go to your home directory for the user you are logged into.
    1. Similar to “cd” ~, however ~ can sometimes rely on the environment.
  2. To return to the previous directory you can type ” cd -“.
    1. This will return you to your previous location, not home.
  3. Type “tailf”, instead of “tail f” for the same results.
    1. Also, “tail -200” can be used instead of “tail -n 200”
  4. Use a custom “PS1” for root, and regular users.
    1. A “PS1” is the text in the login prompt. See Example to the right:
      1. Notice it is yellow
      2. Do the same but in red for root.
    2. Examples:
      1. Debian PS1 for a normal user (as seen to the right)
      2. Debian PS1 for a ROOT user.
        1. These will need to be added to the bottom of “.bashrc” in your home directory
        2. Keep in mind files starting with a . are hidden in Linux, but there.
          1. I also have MAC PS1’s public in my gists.

 

I think that is enough for today, I hope this helps make BASH your friend.

 

-M