Archive for the ‘Uncategorized’ Category

I found another regular expressions tester at http://regexstorm.net. It’s great, it even shows group hits!

Read Full Post »

Well, I finally got it working! Do as follows to install Swedish language on you Xiaomi Vaccum Robot v1 (does not work on v2).

  • Get hold of the secret key for communicating with the robot, this can be obtained by installing an old version of the Xiaomi app (newer ones has fixed this obvious bug) on you Android phone and then run the program MiToolKit on a pc to extract the database from the app.
    After that you need a browser for SQLite and open the miio2.db database file. Look for the column token, which holds the secret key in the devicerecord table. You can also see the ip adress of the robot in this table, which you need later.
  • Download dustclouds package and install that on a Linux enviroment (instructions can be found on the supplied link). By using the token and the ip of the robot you now can control is using the mirobo commands.
  • Go into the folder sound_generator/languages and copy one of the existing files which contains the texts that generator will use. Open you’re copied file and translate the texts to Swedish.
  • Run the sound_generator in python by using the command ‘py sound_generator.py’, select the language for Swedish and the selected tts engine.
  • Go into the newly created folder for the laguage, and run the command “md5sum sv.pkg”, this will give you the md5 the mirobo uses to install the sound.
  • Run the mirobo install_sound, with the created sv.pkg and the md5 value you got from the md5sum command. The sid can be any number >0, for instance 666. I have troubles running the command as a self containing server, so I had to put the sv.pkg up on a webserver and run the install against that server.

Read Full Post »

var myString = Regex.Replace(myString, @"\s+", " ");

Read Full Post »

If you want to use another remote together with Nvidia Shield TV, it can be done with the Flirc dongle. I successfully used this together with an Apple TV remote (I already has the Shield remote, but it often runs out of power, so it’s nice to have another remote as backup when charging the Shield remote). You can basicly use any IR-remote of your choice with Flirc.

Do like this, if you want to map keys for the Shield:
– Connect your Flirc dongle to your computer and use the Flirc GUI to start mapping keys.
– Use the full keyboard as controller (Flirc has the Nvidia Shield TV as a controller, but I didn’t get it to work with my apple remote).
– Map Up, Down, Right and Left to your remote.
– Map Enter (not Enter/Return) to Select on your remote.
– Map Backspace to Back on your remote.
– Map Windows key + Enter to Home on your remote.
– Connect the Flirc dongle to the Shield and start using the remote 🙂

Read Full Post »

Today (on my 40th birthday of all days) I got the error “Git error Unlink of file failed”, when trying to do a fetch from origin in git.

First I tried to restart the computer (since it might be an indication of some file is locked by another program), but that didn’t help.

The resolution to this error is quite simple, I just ran the command “git gc” (which cleans up the repository).

Read Full Post »

2015 in review

The WordPress.com stats helper monkeys prepared a 2015 annual report for this blog.

Here’s an excerpt:

A New York City subway train holds 1,200 people. This blog was viewed about 4,800 times in 2015. If it were a NYC subway train, it would take about 4 trips to carry that many people.

Click here to see the complete report.

Read Full Post »

Today I purchased the game “Project Cars” and it came with Steam. When trying the installer from the disc, it wanted to download the whole game (I didn’t want to wait such a long time), you must do like this to start from the disc:

  • Start a command promt (or use Win+R).
  • Enter the command “”C:\Program files\Steam\Steam.exe” -install D:”, replace “Program files” with the actual name where Steam is installed and “D:” with the drive letter for your DVD.

Read Full Post »

VirtualBox VBOX_E_NOT_SUPPORTED Drive Resize Error or How to resize a Virtualbox that has fixed size:

VBoxManage clonehd mydrive.vdi newdrive.vdi --variant Standard
VBoxManage modifyhd --resize 8096 newdrive.vdi

Replace 8096 with the size in Mb you wish to change to (you cannot shrink a disk!).

Read Full Post »

I’m running !play framework 2.1.3 for a project and today I got the error “Java HotSpot(TM) Client VM warning: ignoring option MaxPermSize=256M; support was removed in 8.0.”. I’ve updated to Java 8 recently and this was the cause, I simply reverted back to Java 7.8 and I can compile the project again!

Read Full Post »

This is from http://css-tricks.com/snippets/css/clear-fix/, use this css style class:

.clearfix:after {
     visibility: hidden;
     display: block;
     font-size: 0;
     content: " ";
     clear: both;
     height: 0;
.clearfix { display: inline-block; }
/* start commented backslash hack \*/
* html .clearfix { height: 1%; }
.clearfix { display: block; }
/* close commented backslash hack */

Just add class="clearfix" to the parent element to fix the overlowing children.

Read Full Post »

Older Posts »