Create strong passwords

At a recent #ubuntu-us-az meeting, this url was posted as an easy way to generate a password. I kinda liked option 4 which uses perl, available in most Linux distros. Should you not have it, apt-get install perl will install it.

#!/usr/bin/perl
#
# REF https://www.ostechnix.com/4-easy-ways-to-generate-a-strong-password-in-linux/
# save as pw.pl
#
my @alphanumeric = (‘a’..’z’, ‘A’..’Z’, 0..9);
my $randpassword = join ”, map $alphanumeric[rand @alphanumeric], 0..7;
print “$randpassword\n”

The code is simple, it creates an array with all the upper, lowercase, and numeric characters. You could add special characters into that array if you want. The [rand @array] generates a random number between 0 and the length of the array, the map $array maps the random number to the random-th element of the array, the join function will join those characters together and it will repeat this 8 times, 0..7

Executing perl pw.pl a few times will help the randomless of the generated password.

Measure your Internet Speed

Based on a recent Slashdot post, here’s a simple way to measure your Internet speed. The project is on GitHub at https://github.com/sivel/speedtest-cli, and to get the Python-based program, simply do this:

wget -O speedtest-cli https://raw.github.com/sivel/speedtest-cli/master/speedtest_cli.py
chmod +x speedtest-cli
Execute ./speedtest-cli –simple to get your results.
See ./speedtest-cli –help for details.

You can also try an HTML5 (no flash, no Java needed) Internet Speed test, http://speedof.me/

Hope this helps.

Arduino workshop at Local Motors

A couple of weeks ago I attended a workshop on Arduino at Local Motors (LM). There were about 20 people, some with experience; others with none. Some brought their own Arduino kits and LM provided kits for us who did not have. First, there was a presentation on Arduino so that we could understand the basics. Then we started the workshop; our first exercise was to blink a LED. In Arduino terms, you enable one pin as output, then you loop to set the value to 0 and 1. Here’s the code:

// Pin 13 has a LED connected on most Arduino boards.
int led = 13;

// the setup routine runs once when you press reset:
void setup() {
// initialize the digital pin as an output.
pinMode(led, OUTPUT);
}

// the loop routine runs over and over again forever:
void loop() {
digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(led, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}

I installed the Arduino IDE (version 1.6.4) on my laptop (14.04) sudo apt-get install arduino arduino-core so I could interface with the board which just connects to a USB port. LM provided breadboards so we could try various schematics, blink 2 LEDs with variable timing, control motors, etc. The LM people were very helpful. I plan to go to the next workshop, it was fun.

_____
http://www.arduino.cc/
https://localmotors.com/explore/search/arduino/