Go to the home folder:

cd ~

Create a script called update_time.sh.

nano update_time.sh

Write this code inside:

sudo date -s "$(wget -qSO- --max-redirect=0 google.com 2>&1 | grep Date: | cut -d' ' -f5-8)Z"

Save it and exit by pressing Control+X and after Y.

Make the script executable:

chmod +x update_time.sh

Run crontab with the -e flag to edit the cron table:

crontab -e

The first time you run crontab you'll be prompted to select an editor; if you are not sure which one to use, choose nano by pressing Enter.

Write a cronjob to call the script every hour:

10 * * * *  /home/pi/update_time.sh

Save it and exit by pressing Control+X and after Y.

View your currently saved scheduled tasks with:

crontab -l

 

This is the way that I use always to develop anything on Windows.

Start downloading Vagrant and VirtualBox:
https://www.vagrantup.com/

https://www.virtualbox.org/wiki/Downloads

Install VirtualBox and Vagrant using the default options.

After reboot, create a folder where you will host all your projects.

I already have one, where is everything. Even if I format the Windows, that folder is intact and is just reinstall everything and resume the work where I stopped.

Open a command window and go to the folder where your projects will be. Write this command:

vagrant init

Edit the file called Vagrantfile without any extension.

Edit this line inside the file:
 

config.vm.box = "base"

change it to:

config.vm.box = "jadesystems/rails5"

Save the file.

We will use a ready vagrant image from here: https://github.com/lcreid/rails-5-jade

On the command write this command:

vagrant up

And wait, it will download the files necessary.

0

Now follow the instructions on the github page from the vagrant image: https://github.com/lcreid/rails-5-jade

Dowload ConEmu:
https://conemu.github.io/

Download Git for Windows:

https://git-scm.com/download/win

Install Git using the default settings. You can change anything if you want, but dont need to this work.

Install ConEmu with the default settings too.

Now, let´s configure to the Git's Bash be the deafult in ConEmu.

Open the settings, press Win + Alt + P, or follow this:

1

Click on the tab Startup, and select {Bash::Git bash} on Specified named Task. Like this:

2

Click on Save settings and close ConEmu.

Open it again and it will start with the Git bash. There you can use SSH as your wish.

3

 

I bought a motherboard from MSI, Z270 Gaming M5. One of the features that make the choice, was the optical audio output.

I tryed to make it work, but was only working in Stereo mode. DTS and Dolby Digital that is the 5.1 modes, was hidden.

After some hours tying to resolve, I was thinking that was the driver that was wrong, but I found the solution.

Seems that my brand new and expensive motherboad dont have DTS or Dolby license, than the driver wouldnt show it to select.

But in a PC WORLD, where everything is possible, I found a workaround. Let's hack the driver. :)

Download this patcher and unzip it: realtek.hd.sound.driver-patch.exe

Download your driver installer and unzip it.

Run the patcher and when you click the 'patch' button, it will open a file browser. Browse through your setup to find each of the two DLLs RltkAPO64.dll and RltkAPO.dll. They are probably in a folder named 'WIN64'.

Screenshot_1 Screenshot_2

You need to make this two times. One for each file. Make one, close the patch and open again.

Run setup.exe and install as per normal. That means reboot when it says.

Now you can select 5.1 output on the SPDIF.

Screenshot_3

Enjoy your surround sound.

 

hdparm is a good place to start.

sudo hdparm -Tt /dev/sda

/dev/sda:
Timing cached reads:   12540 MB in  2.00 seconds = 6277.67 MB/sec
Timing buffered disk reads: 234 MB in  3.00 seconds =  77.98 MB/sec

sudo hdparm -v /dev/sda will give information as well.

dd will give you information on write speed. If the drive doesn't have a file system use of=/dev/sda. Otherwise, mount it on /tmp and write then delete the test output file.

sudo dd if=/dev/sdb1 of=/media/USBHDD1/output bs=80 k count=10k; rm -f /media/USBHDD1/output

10240+0 records in
10240+0 records out
83886080 bytes (84 MB) copied, 1.08009 s, 77.7 MB/s

hukl$ script/server -h
=> Booting Mongrel (use 'script/server webrick' to force WEBrick)
Usage: server [options]
    -p, --port=port                  Runs Rails on the specified port.
                                     Default: 3000
    -b, --binding=ip                 Binds Rails to the specified ip.
                                     Default: 0.0.0.0
    -d, --daemon                     Make server run as a Daemon.
    -e, --environment=name           Specifies the environment to run
                                     this server under
                                     (test/development/production).
                                     Default: development

    -h, --help                       Show this help message.

 

sudo rails server webrick -b 0.0.0.0 -p 3001 -d