Category Archives: UNIX

Auto Added by WPeMatico

Pre-Built Jasper Kits, Ready to go out of the box!

These kits will arrive and be ready to use the moment you power them up. They will be customized to the user, and an image will be provided so they can restore any time they like.

They will include the following:

  • RPI3 B+
  • 32GB Class 10 SD Card
  • US Robotics 9610 [USB Speaker/Mic]
  • Customized/Installed/Setup of Jasper by me personally
    • Install of Jasper and all dependencies
    • STT Setup
    • TTS Setup
  • Testing
    • Running overnight
    • With your settings if you wish
  • Copy of your personalized image for backup
    • In case you wish to restore to a “Known Good” state
  • Updates
    • Such as customized integrations and modules provided by me.
    • Updated Installer / Setup script COMING SOON.


If you are interested in one of these kits, feel free to contact me or start the process by purchasing one below:




Jasper Images Updated version 1.4 (aka Revision 4)

They are updating now; this includes a few fixes and features.

 

  • Jasper Tools Cron Installed (keeps them updated)
  • TTS Server Setup Out of the box!
  • STT Setup Out of the Box! (Just add key in profile.yml)
  • Jasper Start at Boot Cron Installed (allows for Jasper to start at boot)
  • Tested with several different variations of USB devices
    • USB Mic /Speaker Combinations
  • A ‘paired’ installer will be released soon!
    • This will allow the user to answer a few simple questions and have it running in seconds.

I apologize for the delays recently, I have had some personal issues come up.

12 Years without Microsoft and loving it!

As of April, 2004 I stopped using all Microsoft products.

For many reasons. I know people like to debate about microsoft products. However, for me its not a debate.

Examples [Just a tiny bit]:

  • If I was a contractor and came into your company and said, “I am going to record all your keystrokes, and put them on my server every 30min”, you would laugh me out the door. Especially in software, where the source can be recreated from the key logs.  Well, Microsoft does it.
  • If I was a contractor and came in to your company and found a security bug, and then sold it on the black market making you vulnerable before there is a patch to hackers.  You would probably sue me; and maybe even press charges of some kind, as it can put you out of business.  Well, Microsoft does it.
  • If I was a contractor and came in during the night and upgraded all your desktops to an OS you haven’t tested… well I think you get the point by now…
  • UEFI – Just look into it…
  • Severe security issues; and poor coding.
    • Keep in mind even if they don’t use the keylog maliciously, with the poor security wrapped around it, it is within reason to think it would be compromised.

Please keep in mind I am just looking at the black and white of things. This has nothing to do with how I ‘feel’ about them.  From a business standpoint, I can not simply fathom the use of any Microsoft product in any serious company; especially a software development one.

Now, I am experienced in IT/Software Development/DevOps; and anyone will tell you security is a trade off with convenience.  That is true.  However, between the cost (which is high); and the constant worry about security and stability with each patch.  Its something people really need to ask themselves, ” Is this really convenient/cost effective”; and 15 years ago it might have been yes. Now, there is no excuse.

 

Be Careful with LetsEncrypt!

 

I must say, like a lot of people I love the idea of a free SSL Certificate.  So I thought this would be great for my site.  So I downloaded the LetsEncrypt package on to an Ubuntu 15.10 box.  The server was running Apache2, and was pretty much stock.  When I applied the cert to the site, it was super easy.  I was very impressed with the ‘–apache’ option.  I then updated my URLs in WordPress to HTTPS.  That’s it I was up and running in a few min.  I was pretty happy at this point.

Then, I realized it broke all of the other services I had on the machine that were public facing.  I had several.  Even ones with their own certs were breaking.  So I decided to remove it…. After removing it from Apache completely I noticed an issue.  All of my users that had been to the site; were getting redirected still.  Somehow it is keeping the redirct with the cert/data that is installed when the cert is installed from visiting the site.

Long story short, I had many people that thought my site was down.  I even moved servers; and it still happened. I tried clearing browser cache, DNS Cache on my MAC, from another IP. Finally after a reinstall (probably not needed, but quicker); I was able to actually load my site without the redirect.  I am sure there is something here I am not seeing; but to be honest I didn’t feel like spending all my time dealing with browser settings.

If anyone would like to let me know how they get around this I would like to know.

I hope this helps those who are thinking of trying out LetsEncrypt.  I am not saying its a bad product; or idea.  I love the install and the idea of it.  However, the practical implementation is not there yet.  For those reading this keep in mind that it is still in Beta as of this article.  So this might eventually go away.

P.S. – To those on the LetsEncrypt project, I appreciate all the work; and I hope you take this criticism positively. A good uninstall path is needed before I think this will go mainstream on monolithic boxes.  Maybe its ok with a 12 factor applications.

Sincerely,

Matthew Curry

Quick Tip of the Day.

Not that I have them daily, but I might if I get a good response.

Have you ever tried logging into an SSH server, and get a weird error:

/.ssh/config: line 22: Bad configuration option: 342200202

This is a very simple issue but it can be a huge PITA if you can’t fix it quickly.  This is especially true for those of us that have to use an enormous amount of keys in our daily lives.  I know, I have a fairly simple config for SSH, but I still ran into this issue when I pasted a block of text in  ~/.ssh/config.  I opened the file with VI, and NANO. I was only able to get it to work when I removed the spaces before each line it complained about.  I then just put them back as normal, and saved.

It turns out, that copying from another place can have the spaces not interpreted properly. They are tabbed indentations actually.  Once manually removed they are replaced by a normal “space” in the code and it should work properly.  I hope this saves some time for some people.

 

Thanks,
Matthew D. Curry

 

Top 10 Most Powerful Computers in the World!

As some people may know; I like to use the example of  “Out of the top 500, how many supercomputers in the world do you think  use [your OS here]?”.  I use this example for a reason.  Unlike conjecture, theories, and even “gut feelings”; it shows that the OS was chosen, and serious money and time were poured into it.  This shows that is it at least a player in the field, and can handle the serious levels of computing needed.  It also shows things like, tune-ability, flexibility with change, and a few other things that only the people working with their own projects will be able to tell.  We are not concerned with that, just that they are on the list; and why if it sticks out as odd to see why.

I am using the TOP500 Project for this information, and it does get re-evaluated often.  However, I will say this; just like in nature there will always be a pretty clear delineation when it comes down to who is the “Winner” in this space.  Or the most efficient/successful like in nature.

The reason I write this article is to show a certain group of people an example of the difference in reality versus what advertisements, rumors, and self-perception have molded in their minds.  I think it is a good exercise to show the affects of the budgets used to change our perceptions. A good example is the budget used by companies like Microsoft (over $2,000,000,000); and Apple (over $1,000,000 in 2013/2014).  This is just money, and perception however.  This will never affect real life numbers on performance, math doesn’t lie. Results and time are my favorite sources of information.  Its a simple concept, there are 1000s of ways to move items.  However, in our lives in this age of technology the wheel is still very much in use.   Its the best solution at the time…. (a small but powerful statement).

So in lieu of keeping you away from the data pron you came to look at:

 

Top 10 Super Super Computers - Nov 2015

Top 10 Super Super Computers – Nov 2015

 


 

Here is the actual breakdown by OS (as of Nov 2015), as I know that is what most people are interested in:

List_Statistics___TOP500_Supercomputer_Sites

 

I know some people are wondering where is Windows, or IOS.  If you will notice; even in the breakdowns by OS they are pretty much all Linux/BSD [Windows isn’t even a filter option on their site as of right now].  This list is more a list of flavors of Linux with a few BSD machines in the list.  You will notice, like in most of the lists done in the past; there is not a single Microsoft product on the list.  This is a very simple, and very important fact that way too many people make.  This includes everyone from the guy that fixes your desktop all the way up to the VP of Infrastructure.  They are all swayed by what they own, and the amount of advertising spewed forth at them non-stop. Keep in mind these people are generally more connected than the rest of the populous.  Thus, affected even more so by the ads.  Combine that with sales people/calls/pressures on support/etc, and you get smart companies ( I didn’t say large), that make really bad technology decisions.  I exclude myself from that ad loop; and look purely at statistical performance.   This is great for business; since you can eliminate a TON of costs; and licensing fees/etc that you would have if you went with something not on this list.

 

List_Statistics___TOP500_Supercomputer_Sites 2


 

Want to see the full list of over 500 super computers for 2015?

Time Machine Backup with Ubuntu 15.x and OSX 10.7+

In the Older versions of this how-to, you will see people use the method shown just below.  Obviously that no longer works.  I will walk you through setting up TimeMachine via AFP over your LAN.  This is using an Ubuntu 15.04 machine; but since all the packages are common and in the base repos; I don’t see there being a problem getting it to work on any distro.

 OLD METHOD:
defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1
NOTE: Any OSX after 10.6 Lion, will have to use the method demonstrated here.

 

Step 1: Install Netatalk

Install the following packages:

sudo apt-get install netatalk libc6-dev avahi-daemon libnss-mdns

Step 2: Configure /etc/nsswitch.conf

Once those packages are installed, we have to adjust 4 configuration files:

sudo nano /etc/nsswitch.conf

Locate the following:

hosts:          files mdns4_minimal [NOTFOUND=return] dns mdns4

Add mdns  as below:

hosts:          files mdns4_minimal [NOTFOUND=return] dns mdns4 mdns

Step 3: /etc/avahi/services/afpd.service

sudo nano /etc/avahi/services/afpd.service

Paste the following:

<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
    <name replace-wildcards="yes">%h</name>
    <service>
        <type>_afpovertcp._tcp</type>
        <port>548</port>
    </service>
    <service>
        <type>_device-info._tcp</type>
        <port>0</port>
        <txt-record>model=TimeCapsule</txt-record>
    </service>
</service-group>

Step 4: /etc/netatalk/AppleVolumes.default

Now we setup the share:

sudo nano /etc/netatalk/AppleVolumes.default

At the bottom the section that reads:

# The line below sets some DEFAULT, starting with Netatalk 2.1.
:DEFAULT: options:upriv,usedots

# By default all users have access to their home directories.
~/                      "Home Directory"

# End of File

Change the path “~/”  to your share directory.

IMPORTANT:  Don’t forget to add ‘tm’ to options:upriv,usedots
As seen below:

# The line below sets some DEFAULT, starting with Netatalk 2.1.
:DEFAULT: cnidscheme:dbd options:upriv,usedots,tm

# By default all users have access to their home directories.
/path/to/share                       "Time Capsule"

# End of File

Step 5: /etc/default/netatalk

Now, we need to adjust netatalk settings.

sudo nano /etc/default/netatalk

Locate the following section:

#### Set which legacy daemons to run.
#### If you need AppleTalk, run atalkd.
#### papd, timelord and a2boot are dependent upon atalkd.
ATALKD_RUN=no
PAPD_RUN=no
TIMELORD_RUN=no
A2BOOT_RUN=no

Update it to reflect the following:

#### Set which legacy daemons to run.
#### If you need AppleTalk, run atalkd.
#### papd, timelord and a2boot are dependent upon atalkd.
ATALKD_RUN=no
PAPD_RUN=no
CNID_METAD_RUN=yes
AFPD_RUN=yes
TIMELORD_RUN=no
A2BOOT_RUN=no

Once all is completed, and all the services have been restarted on the Ubuntu server.  The drive should show up under “Select Disk” under “Time Machine Preferences”.  If you have an old one, you may have to remove it.  Once selected you can use it as if it were physically plugged in.

 

*TIP – Use a wired connection only, and a gigE network will help immensely.  I do not recommend WiFi .

Search entire server for Q4 2015 obfuscated PHP malware of unknown origin.

This is just a snippet I have used before to identify some malicious code on web servers.  This will not work on everything; but it will give you a way to find suspect files.  It is easy to cron in a script with others to make a nice daily report if you have those concerns.

#!/bin/bash
# Malware Search Script
# 11/1/15 – Matthew D. Curry
# Matt@MattCurry.com

echo “Search entire server for Q4 2015 obfuscated PHP malware of unknown origin.”

find / -name *.php -exec grep -Hn .1.=…….0.=…….3.=…….2.=…….5.= {} ;

 

Hope this helps, enjoy.

Remove Spaces (or any character) from File Names in Linux

This is actually a pretty common thing to run into in a Linux file system.  It is especially prevalent in the files that are moved from another operating system (Usually Windows).  So if you get files that need to have a space or a character removed, the below snipped is a very simple, and handy way to fix this issue.

└─(11:26:40)-(~/Example)->ls
file 1.txt
file – 2.txt

So, from here we want to rename the file “file 1.txt” to “file_1.txt”.  This would be done as follows:

rename ‘s/ /_/g’ file 1.txt

This will remove any spaces in the file-name listed.  If you want to do all the files in a directory:

rename ‘s/ /_/g’ *

Here is an example output if we run it on all the files in the directory (as seen above):

└─(11:33:59)-(~/Example)->ls
file_1.txt
file_-_2.txt

 

Note:  If you are new to Linux; and you haven’t heard of the “sed” command, that is the syntax used in the command.  If you get comfortable with this, then you can easily learn sed, which is a great tool to have on the command line.