Wednesday, November 14, 2012

Print a folders structure to file

I come to a tast to examine whole source code structure on SVN and propose restructure it to new layout. some projects were grouped in sub folders.

Install "tree" tool:
sudo apt-get install tree

Command to print tree, without temporary and useless folders, dig in 4th level:
tree -L 4 -d -I "target|webapp|doc|docs|site|src|deploy|sh|java|data|scripts|lib|conf|work|bin|web|webscr|META-INF|hibern|www|css|images|templates|test-conf" > structure.txt

Output is like:


├── auth
│   ├── apache-modules
│   │   ├── auth_client
│   │   │   └── test
│   │   ├── googleauth
│   │   │   └── example
│   │   ├── jansson-2.2
│   │   │   └── test
│   │   ├── m4
│   │   └── mod_some_auth
│   ├── auth-client
│   ├── auth-errors
│   ├── auth-server

Problem with switching LibeOffice windows by Alt+Tab and in vertical panel

Issue is open for this problem: https://bugs.launchpad.net/ubuntu/+source/libreoffice/+bug/844119
Please vote to raise importance of this bug.

Workaround suggested Matthias Niess in bug comments:

switching works fine if open SpreadSheet from Dash and then open files from Cntl+O.

as an option you can install LibreOffice4 from official site - but in this case you loose Unity integration of menu, (instructions for installation).

update:
looks like fixed in latest ubuntu updates (March 2013), I aslo updated Libreoffice to 4.0 by http://www.webupd8.org/2013/03/install-libreoffice-40-in-ubuntu-1204.html


sudo add-apt-repository ppa:libreoffice/libreoffice-4-0
sudo apt-get update

.... and do install from ubuntu Center, and now Libreoffice works fine.

Sunday, November 11, 2012

Change order of sections in Jenkins Sections View Plugin


We use "Section View Plugin"  to manage numerous configuration and group them to ease search and making a family of configurations.

List of all issues of this plugin.

My proposition:
JENKINS-15798 - Allow changing order for Sections in configuration.
Please vote if you have the same problem

SevNTU Checkstyle version 1.6

We finished new version of our extension for Checkstyle - release 1.6.
I updated wiki pages to allow other developers easily join the project.
Read our publications, in Russian language, latest is for 1.5.3 release, for 1.6 will be soon.

Release 1.6.0 (21/October/2012):

LogicConditionNeedOptimizationCheck -  This check prevents the placement of local variables and fields after calling methods in '&&' and '||' conditions. Done by Ilja Dubinin.
Example:
"if (isVisible() && active)" == should be refactored to ==> "if (active && isVisible())"
Reason: swap of conditions expressions will be beneficial, but some time you can find logic that in isVisible() change 'active' variable value and this optimization will not be correct - but this is sign of bad  design!

ForbidCCommentsInMetods -  Check prevents usage of C-style (/* ... */) comments inside method body. If you have class declaration inside method body with JavaDoc you will get error too, that is sad side effect for now, but I did not met such cases for now, so I thunk it will be incentive to move class out. Done by Ilja Dubinin.
Reason: C-style of comments are problem for future investigation, it should be treated as DEBUG/temporal comments, but should be cleared finally.

InterfaceTypeParameterNameCheck -  Checks that interface type parameter(for template) names conform to a format specified by the format property. Default format is ^[A-Z]$. Done by Dmitry Gridyushko.
Reason: to avoid template types to be like <INPUT>, <CUSTOM>, <LISTENER> and force developer to name them by 1 letter <I>, <C>, <L>. to clearly indicate nature of variable in code down the file.

All details are here: http://sevntu-checkstyle.github.com/sevntu.checkstyle/
We will do bug fixing in 1.6.1 and 1.6.2 as always, please test and report bug ...... .

Saturday, November 10, 2012

Keyboard shortcut to access google search field

I remember that I used google's shortcuts  feature to navigate links and focus to search field. But looks like there is not such feature.

but, you can at least easily access google's search field without anything preconfigured.

1) Type "hello" in google search filed
2) Press Enter.
3) Press "Space" to examine rest of the page on bottom.
4) Press "Backspace" key and you will be moved to search field with cursor in it. Clear content and type smth else.

How to do complete copy of static web site


One my fried asked me to grab/copy one site that was simple and static to let him change it a bit and make his own site base on it.

Example of command that do copy of site that will be ready to copy to new hosting:


In my Windows past time I installed special application to do this :), one more point to enjoy command line tools of Linux.

Friday, November 9, 2012

Ubuntu get popularity from other Linuxes

Ubuntu become more and more popular, but is it due to new users that come from Windows ?

I do believe to wikipedia statistics as it only resource that is visited by all internet user no matter what OS or browser they use.

data sources links:
http://stats.wikimedia.org/wikimedia/squids/SquidReportOperatingSystems.htm
http://stats.wikimedia.org/archive/squid_reports/2011-10/SquidReportOperatingSystems.htm

Result show that Ubuntu get popularity from other Linux systems, but we see 0.07% of grow :) in general.
Does it mean that Linux users become more lazy and choose Linux that works out-of-the-box, and fed-up with doing all from scratch ? or it is just statistical rounding that significant grow other OS in amount of users
red - decrease of popularity.
green - grow of popularity.

Wednesday, November 7, 2012

How to get all logs from Mysql server


For CentOS:

Put following to /etc/mysql/my.cnf: 
log=/var/log/mysql/mysql_log.log 
general_log = 1 
general_log_file = /var/log/mysql/mysqld.log 
log-warnings = 2 
log-error = /var/log/mysql/mysqld.error.log 
slow_query_log =1 
slow_query_log_file = /var/log/mysql/mysqld_slow.log 


Restart Mysql service (service mysqld restart) 
Setup logging: 
mysql> SET GLOBAL general_log = 'ON'; 
Check logging variables: 
mysql> SHOW VARIABLES LIKE "general_log%";

Tuesday, November 6, 2012

Why there is not network coverage in San Francisco MUNI underground

I did not found answer on this , but I am fed up with long commuting underground without coverage.
BART underground have good signal.

I tried to contact support at http://www.verizonwireless.com/b2c/contact/index.jsp
Please send them request to raise this problem again an again: https://wbillpay.verizonwireless.com/vzw/secure/contactus/email.action

My question at forum:
https://community.verizonwireless.com/thread/787208

Monday, November 5, 2012

Convert SVN project to GIT

sudo apt-get install git-svn

There is a good manual to moving projects from SVN to GIT (In Russian):
http://habrahabr.ru/post/144626/

To get list of all users for user-map:
svn log > log_all.txt
cat log_all.txt | grep "^r[0-9]" | cut -d" " -f3 | sort | uniq -c > svn-git-users-map.txt

Empathy problems in Ubuntu 12.04

1. Problem to be notified about new/missed message for Empathy.
Workaround:

2. When you quit from Empathy in launch panel, Empathy disappear from panel but still launching (see problem above to show it in tray top panel):