Tag Archives: open source

Omnia Turris – random rainbow colours

Script for Omnia Turris making your router light with random colour every second.

 

 

 

#!/bin/bash
 
colors=('red' 'blue' 'green' 'white');
leds=('lan0' 'lan1' 'lan2' 'lan3' 'lan4' 'pwr' 'wan' 'pci1' 'pci2' 'pci3' 'usr1' 'usr2');
 
while true; do
    for led in "${leds[@]}"
    do
        rand_color=$[$RANDOM % 5]
        rainbow ${led} ${colors[rand_color]}
    done
    sleep 1;
done

To get this quickly working:

  1. login on your Turris router
  2. wget https://gitlab.com/snippets/34184/raw -O random_rainbow.sh
  3. bash random_rainbow.sh &
  4. you can logout now, script will be working in background

Choose GitLab for your next open source project

GitLab.com is a competitor of Github. It’s a service provider for git-based source code repositories that offers much more than it’s bigger brother. In this post I will try to convince you to try it out for your next project.

GitLab is not only a simple git hosting; its features impact the whole development process, the way of contributing to a project, executing and running tests, protecting source code from changes, more and more.

gitlab-logo-square Continue reading