środa, 20 lutego 2013

Ubuntu mount samba folder

If you have a problem with samba on Ubuntu, try something like this:
You need:
- smb packet or if You don't have, install like that: sudo apt-get install smbclient

Check your samba server, [-L|--list=HOST], [-U|--user=USERNAME]

smbclient -L 192.168.1.xx -U username Enter username's password:

Domain=[WORK_GROUP_NAME] OS=[Unix] Server=[Samba ver.]

Sharename Type Comment 
--------- ---- ------- 
username Disk username devel
then: check man mount, man mount.cifs and options and:  

mount -t cifs //192.168.1.xx/username/samba_folder /home/username/local_folder/ -o username=WORK_GROUP_NAME/username,password=passwd

środa, 13 lutego 2013

HowTo: Check RAM Size In Ubuntu Linux

I was looking for the way how check size used memory in Ubuntu, I found like this

ps -e -orss=,args= | sort -b -k1,1n

I know about command top, but it's very satisfactory.

wtorek, 12 lutego 2013

Temperature in html5

It is my first commit to GitHub. I made simple tools for my friend.
It's very simple script in JQuery and HTML5.
It was a year ago, maybe useful for someone.
In the folder "data/" are test measurements in files.


I am using FileReader from HTML5 for reading file with data and google.visualization.LineChart.

poniedziałek, 4 lutego 2013

Mysql - Polish chars e.g: ź,ż,ć

How you can search Polish chars e.g: ź,ż,ć etc. in Wordpress using MySql query ?
If you uses Wordpress and create db query - not wp_query, check your tables in DB where you searching. In my case helped change from utf8_general_ci COLLATION to utf8_spanish_ci.

prevention: ALTER DATABASE `db_name` DEFAULT CHARACTER SET utf8 COLLATE utf8_polish_ci; and: ALTER TABLE wp_postmeta CONVERT TO CHARACTER SET utf8 COLLATE utf8_polish_ci; 

Maybe you should look to
before installing wordpress.

I found an interesting solution but it is not optimal!:
CONVERT(table_name USING utf8) COLLATE utf8_polish_ci LIKE '$letter%'