The NanoPI NEO Plus 2

the guys at Frendly elec Just created a very interesting board witch check a lots of mark in the things I look for in a SBC,

  • First : a good CPU
    the Allwinner H5 , is a powerful enough CPU that you might need to cool if you wish to use it at it’s full potential
  • Lots of RAM , 1GB DDR3
    the main issue i have with the OrangePI zero is that there is only 512 MB of ram in the biggest version. for a  lot of usages , it’s not enough.
    1GB should be plenty
  • integrated flash memory
    the problem with µSD card is that they degrade overtime , and after a year or two , you will see problem with you card unless you take special precaution to limit writes to the SD card.
    With eMMC the life of the memory should be longer.
  • Wifi b/g/n with a well supported chipset : the AP6212
  • Some GPIO’s
  • GIGABIT ethernet ,  a must have !

the price is 24.99$ at http://www.friendlyarm.com

Libre Computer Board a nice 4K capable SBC

Kickstarter spawned a very interesting board ,
it’s called Le Potato from the company Libre Computer Board

this board is designed to offer exactly the same layout as the RPI3 , but absolutely destroy it in term of performance

‘the powerful cpu and the large amount of ram enable usages forbidden by the low power of the RPI3.

  • A powerful web server
  • A NAS
  • A fast VPN gateway
  • A local media server
  • A torrent downloader
  • A media encoder
  • A IP camera storage server
  • Or a lightweight desktop computer

 

The cpu is a Quad 64-bit ARM Cortex-A53 CPU + ARM Mali-450 GPU it will need a active CPU cooling , which is provided in the 65$ option.

The specs given by the manufacturer are

HDMI 2.0
4 USB 2.0 Type A
RJ45 100Mb Fast Ethernet
CVBS
Infrared Receiver
S/PDIF Header
UART Header
I2S + ADC Header
40 Pin Header for PWM, I2C, I2S, SPI, GPIO
eMMC Daughter Board Connector with the option for a 64GB emmc in the 99$ reward
MicroSD Card Slot with UHS Support

 

In some multiusers cases the 100 mbps ethernet port might limit the usage as a NAS. But in most cases, it should be fine as a NAS for 1 or 2 simultaneous users
But the hdmi 2 port is great if you think using it as a media machine connected to a TV for example
The lack of wifi connectivity is disappointing. And one of the 4 USB ports will be reserved for a Wi-Fi adapter
They justify this decision because of a lengthy certification process.
The maker plan on releasing a Wi-Fi + Bluetooth mezzanine in the future witch will address the lack of radio connectivity

Bash script to clean movies name


The issue when you download movies online, is that most of the time the file name is going to be complete trash , filled with useless info like the team that made the rip or the website from where the movie was downloaded.
This is very annoying when you sort by name and the website made the idiotic decision to put their name in front of the actual film name.

for example here a typical movie name
[ Torrent9.info ] Dont.Think.Twice.2016.FRENCH.WEBRip.XviD-NEWCiNE.avi
the actual useful data that i wish to keep is Dont.Think.Twice.2016.avi

for this purpose i’ve developped a small bash script that will list all the files in a chosen directory then , if necessary , will rename the file.

this is not a very efficient script
but it’s fulfill it’s purpose and very rarely encounter a filename that he is unable to clean.

BASH:check if a number is even or odd


In a bash script you might need to check if a var is even or odd , 

in my case im going to use a if to make that check

You can use this simple code to make that check and display the result.

the result will be : 

BASH : Make a SQL query from bash

MySQL is a very convenient way to store data .
To use stored MySQL data in a BASH script you can use this simple command

this will display the result in you terminal without ASCII decorations.
if you need to use that data for something , you can store it in a var

BASH : IP validation 

if you have a list of ip to validate ,
you can use this little bash script ,
this will open your IP list ,
then test if all the 4 numbers that make a standard IP.are beeten 0 and 255

if the ip is valid then the script will return valid , else it will return : not valid

after execution , you will get the following result :

Use AWK to display x-th and y-th lines after a regex match

In a script you might be interested to keep 2 or more lines after a regex match ,
the line that interest you are not always going to be right after the match ,
the first one might be X lines after the match and the second one Y lines afters the match

in this example , i’m interested in keeping the lines with the price and the number in stock
i’m going to use awk to search for item desc , and display the 4th line after the match, and 6th line.

Bash : Delete some characters from a file with TR

in this little example of usage of the command tr
we want to clean a file so the values contained in it can be used
Example File

In my example i wish to only keep the value and deleting the character < and >

the tr command used with the -d (delete) option will allow you to delete the list of characters contained between the quotes.

You will obtain the following result

UNPROTECTED PRIVATE KEY FILE fix

If you try to connect using a key system on ssh instead of a classic password login, you might encounter this error message.

this message tells you that because other users can read the content of the key , shh refuse to use it to try authentification on you host ssh.

to fix that problem you should change the permissions on you file so that only you can read it

the 3 numbers in the chmod command are like this
the First is for you
the second is for your group .
and the last is for other users.

If you want to limit the access of others to you ssh key
you could do a

after this command , you can relaunch you ssh command , and you should connect without providing a password.