Archive for April, 2017

JavaScript: Get a random number within a range

📅 April 26, 2017
The Math object in JavaScript provides the random() function that returns a floating point value from 0 to up to but not including 1.

What if we want to grab an integer, say, from 1 to 25 inclusive?

We can do this easily by modifying the random result to our liking.

Read the rest of this entry »

,

Leave a comment

Color Test Your Terminal

📅 April 11, 2017
Are you curious to find out what colors your terminal supports?

The program colortest-python answers this question by displaying colors in a variety of ways.

Read the rest of this entry »

,

Leave a comment

Put Filenames in Bash Array

📅 April 8, 2017
Bash arrays can be tricky, so here are a few hints to aid understanding.

Read the rest of this entry »

,

Leave a comment