2014-12-27

Midori browser






Firefox got heavy and slow! Midori save the day!

It has several bug's, nevertheless I going to use it couse it's a great browser and I realy like it! I wait for bug's to be fixed and then uninstall firefox.



2014-12-15

Back to firmware writing! STM32, can use Open Source Tools for that?

It looks like the answer is "YES"!

First step would be setting up the tools and environment.


I followed this video



Then make notes for my self:

GNU Tools for ARM Embedded Processors

https://launchpad.net/gcc-arm-embedded

Open terminal at toolchain bin directory, and:


$ pwd 
/media/9c04SSDp1/stm32/gcc-arm-none-eabi-4_9-2014q4/bin

$ echo PATH=$PATH:/media/9c04SSDp1/stm32/gcc-arm-none-eabi-4_9-2014q4/bin

$ echo PATH=$PATH:/media/9c04SSDp1/stm32/gcc-arm-none-eabi-4_9-2014q4/bin >> $HOME/.bashrc

$ source $HOME/.bashrc


$ ./arm-none-eabi-gcc --version
arm-none-eabi-gcc (GNU Tools for ARM Embedded Processors) 4.9.3 20141119 (release) [ARM/embedded-4_9-branch revision 218278]
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


Actually there is a better way!

 







Add your path, for example mane looks like this:


/media/9c04SSDp1/stm32/gcc-arm-none-eabi-4_9-2014q4/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games




Also make shure:






Eclipse IDE for C/C++ Developers
http://www.eclipse.org/downloads/

Eclipse CDT extensions for GNU ARM development
http://gnuarmeclipse.livius.net/blog/plugins-install/

I made a "hello world" project, and it compiles! Nice!

Stm32 discovery line Linux programmer
https://github.com/texane/stlink


I don't have hardware yet, so I can not test the results.
To be continued...



2014-11-21

RaspberryPi Home security (Home project)

Components:

  • RaspberryPi
  • old USB GSM modem stick ( unused, collecting dust in a drawer )
  • ordinary USB Webcam

Plan:

I have http server already running on  RaspberryPi.

I can communicate with Modem via minicom (/dev/ttyUSB0), so I will write a simple program that sends SMS using AT Commands.

I can get pictures from webcam , so I will put it, so it can be viewed on web.
Or even send to me via email.

I can access gpio, so I can detect if doors were open...
Or maybe I will connect a movement sensor to it (similar that one used in stairways, to turn the light on and off).


                                                  AWESOME!!!

 I will put more info later!





2014-11-20

What is recursion and when should I use it?

The most simple example would be,
browsing throw directory’s

I find this example:
http://stackoverflow.com/.../... 

void Mainwindow::ReadDir(QString path) {
    QDir dir(path);                            //Opens the path
    QFileInfoList files = dir.entryInfoList(); //Gets the file information
    foreach(const QFileInfo &fi, files) {      //Loops through the found files.
        QString Path = fi.absoluteFilePath();  //Gets the absolute file path
        if(fi.isDir()) ReadDir(Path);          //Recursively goes through all the directories.
        else {
            //Do stuff with the found file.
        }
    }
} 
 
I had a Job interview and had this question  (30 min. on the Phone).
I unable to recall the example for recursion.  
Sadly my brain doesn't work very well under pressure.

Bug hunting with git bisect



http://git-scm.com/docs/git-bisect

SQL all types of JOIN

I read explanations about it and it was hard to understand...
Once You see this, it's too obvious!