tag:blogger.com,1999:blog-41207156112906828332024-03-18T03:45:30.208-07:00Scriptoid - automate your businessUnknownnoreply@blogger.comBlogger23125tag:blogger.com,1999:blog-4120715611290682833.post-46583571340063201672010-11-28T04:19:00.000-08:002010-11-28T04:32:52.187-08:00OpenSuse in VirtualBoxI had to install an <a href="http://opensuse.org">OpenSuse</a> 11.2 in <a href="http://virtualbox.org">VirtualBox</a>. Host machine is a Windows 7. I used the Gnome desktop for OpenSuse.<br />I wanted to have smooth integration: copy/paste, auto resize of the guest, etc.<br /><br />Things you need to keep in mind.<br />1. Run VirtualBox->Devices->Install Guest Additions<br />2. In Suse go to /media/VBOXADDITIONS<br />and run the script you need. This does not means the vbox additions are up an running<br />Check this with<br /><br /><span style="font-family: arial; color: rgb(102, 102, 204);"> /etc/init.d/vboxadd status</span><br /><br />3. As the upper command will tell you that that service is not running, you need to run<br /><br /><span style="font-family: arial; color: rgb(102, 102, 204);"> /etc/init.d/vboxadd setup<br /><br /></span><br /><span style="font-family: arial; color: rgb(102, 102, 204);"><span style="color: rgb(0, 0, 0);">4. As that command will also not work it's time to add from Yast: <br /></span></span><ul><li><span style="font-family: arial; color: rgb(102, 102, 204);"><span style="color: rgb(0, 0, 0);">all modules in "Development" package related to kernel </span></span></li></ul><ul><li><span style="font-family: arial; color: rgb(102, 102, 204);"><span style="color: rgb(0, 0, 0);">and also all related to 'make' (yes C++ tool) tool.</span></span></li></ul><span style="font-family: arial; color: rgb(102, 102, 204);"><span style="color: rgb(0, 0, 0);"><br />5. Now run again<br /><br /></span></span><div style="text-align: center;"><div style="text-align: left;"><span style="font-family: arial; color: rgb(102, 102, 204);"> /etc/init.d/vboxadd setup</span><br /></div><span style="font-family: arial; color: rgb(102, 102, 204);"></span></div><span style="font-family: arial; color: rgb(102, 102, 204);"><br /></span><span style="font-family: arial; color: rgb(102, 102, 204);"><span style="color: rgb(0, 0, 0);">6. Now restart machine. It should work.<br /></span></span>Unknownnoreply@blogger.com2tag:blogger.com,1999:blog-4120715611290682833.post-24588793141388852382010-11-05T02:55:00.000-07:002010-11-05T03:02:30.330-07:00Interesting booksMy 1.2 year old girl has recently made a passion to pull out books from the shelve.<br /><br />We placed a special shelve with kids book just she will "focus" her destroying efforts toward her books.<br /><br />But she got bored and she went to my IT books. It was funny as she started to pull out <a href="http://oreilly.com/">Oreilly</a> books. Why?<br /><br />Well, I sneak behind her and watched her silently. She went to the shelve, look for a while and put her little finger on the small animal figure each oreilly books has - and then she pulled out the book.<br /><br />Ok, so that is the reason <a href="http://oreilly.com/">Oreilly</a> IT books are appealing to kids - they have animal pictures on them :)<br /><br />My question is, how much of the decision to buy such a book is due to the fact we like those pictures too?Unknownnoreply@blogger.com8tag:blogger.com,1999:blog-4120715611290682833.post-20509114679700010972010-09-22T05:39:00.000-07:002010-09-22T05:46:33.211-07:00HTML nested formsTo my surprise it seems that HTML does not support nested forms in form or<br /><br /><form action="" method="POST"><br /> <br/>Outer Age <input type="text" name="age"><br /> <form action="" method="POST"><br /> <br/>Inner Age <input type="text" name="age"><br /> <br/><input type="submit" value="Inner" id="inner"><br /> </form><br /><br /> <br/><input type="submit" value="Outer" id="outer"><br /></form><br /><br /><br />The guys from <a href="http://www.w3.org/MarkUp/html3/forms.html">w3.org</a> are saying:<br /><br />"<span style="color: rgb(102, 102, 102);">There can be several forms in a single document, but the FORM element can't be nested.</span>"<br /><br />Well, I tried to do it and to my surprise the outer form submit is completely ignored.Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4120715611290682833.post-43740488468128184342010-09-19T23:30:00.000-07:002010-09-22T01:24:28.648-07:00Find your SuSE versionFrom time to time I need to find the <a href="http://opensuse.org/">SuSE </a>version for the box I'm connected to.<br />So all I need to do is type the following command into a console:<br /><br /><span style="color: rgb(51, 102, 255);">cat /etc/SuSE-release</span><br /><br />Another option is to use the following command:<br /><br /><span style="color: rgb(51, 102, 255);">lsb_release -a</span><br /><br />Good to know.Unknownnoreply@blogger.com1tag:blogger.com,1999:blog-4120715611290682833.post-31004755292500973002010-08-26T00:10:00.001-07:002010-08-28T13:52:08.515-07:00Files in BLOGS or FilesystemAlmost all <a href="http://en.wikipedia.org/wiki/SQL">SQL </a>based projects (ex: <a href="http://en.wikipedia.org/wiki/LAMP_%28software_bundle%29">LAMP</a>) require a way to store files.<br /><br />I've encounter this problem so many times and so many times I had to think about pros (<span style="color: rgb(0, 153, 0); font-weight: bold;">+</span>) and cons (<span style="font-weight: bold; color: rgb(255, 0, 0);">-</span>) that I decided to put them down into this post so anytime I will encounter this problem I will be fast updated :D<br /><br />There are 2 ways to store files:<br /><ol><li>into the SQL as <a href="http://en.wikipedia.org/wiki/Blob_%28computing%29">BLOBS<br /></a></li><li>into the <a href="http://en.wikipedia.org/wiki/File_system">file system</a> as normal files</li></ol><span style="font-weight: bold;">Store them as BLOBS</span><br />(<span style="color: rgb(0, 153, 0); font-weight: bold;">+</span>) avoid file system permissions nightmare<br />(<span style="color: rgb(0, 153, 0); font-weight: bold;">+</span>) all <a href="http://en.wikipedia.org/wiki/Create,_read,_update_and_delete">CRUD</a> operations can be transactional (if your database supports transactions)<br />(<span style="color: rgb(0, 153, 0); font-weight: bold;">+</span>) can be replicated<br />(<span style="font-weight: bold; color: rgb(255, 0, 0);">-</span>) bigger databases (dumps will take longer and will be bigger)<br />(<span style="font-weight: bold; color: rgb(255, 0, 0);">-</span>) if you want to use <a href="http://en.wikipedia.org/wiki/Rsync">rsync </a>or similar tool to backup your web app the whole database will be backed (unless rsync has a way to save only delta of a .sql file)<br />(<span style="font-weight: bold; color: rgb(255, 0, 0);">-</span>) JOINS with BLOB tables will take longer<br /><br /><br /><span style="font-weight: bold;">BLOB Hybrid solution</span><br />A hybrid solution might be to store the BLOB/files into a separate table and use foreign keys to it.<br /><br /><span style="font-weight: bold;">Store as normal file</span><br />Usually the file is stored<br />(<span style="color: rgb(0, 153, 0); font-weight: bold;">+</span>) database is way more smaller<br />(<span style="color: rgb(0, 153, 0); font-weight: bold;">+</span>) rsync will generate a smaller network traffic (less bandwidth consumption)<br />(<span style="color: rgb(0, 153, 0); font-weight: bold;">+</span>) database backups will be faster (only the data in the SQL database)<br />(<span style="font-weight: bold; color: rgb(255, 0, 0);">-</span>) you need to take care of file permissions<br />(<span style="font-weight: bold; color: rgb(255, 0, 0);">-</span>) it can not be replicated<br />(<span style="font-weight: bold; color: rgb(255, 0, 0);">-</span>) all <a href="http://en.wikipedia.org/wiki/Create,_read,_update_and_delete">CRUD </a>SQL operations will be more complicated as you will need to take care of the files too<br />(<span style="font-weight: bold; color: rgb(255, 0, 0);">-</span>) need to take care of orphaned files (a <a href="http://en.wikipedia.org/wiki/Cron">cron job</a> to detect them and then to solve the problem)<br /><br />Links:<br /><a href="http://www.dreamwerx.net/site/article01">http://www.dreamwerx.net/site/article01</a> - How to use the hybrid solutionUnknownnoreply@blogger.com2tag:blogger.com,1999:blog-4120715611290682833.post-911601004842525382010-07-15T23:21:00.000-07:002010-07-15T23:29:34.564-07:00Run JavaScript from SciTE<a href="http://www.scintilla.org/SciTE.html">SciTE </a>is a fantastic text editor. I used it for small and fast prototyping of code.<br /><br />Lately I had some important project to code (<a href="http://diagramo.com">diagramo.com</a>) and I needed to test some JavaScript codes and I thought it might be handy to run the code from within the SciTE.<br /><br />Here is the solution:<br />1. First you need to install the latest <a href="http://java.sun.com/javase/downloads/index.jsp">Java SDK</a> and after install see that jrunscript (JavaScript interpreter - based on <a href="http://www.mozilla.org/rhino/">Rhino</a>) is in you path<br /><br />2. Go to Scite's folder and open cpp.properties and add the following line:<br /><span style="color: rgb(102, 51, 255);">command.go.*.js=jrunscript $(FileNameExt)</span><br /><br />Done<br /><br />Now every time you press <span style="font-weight: bold;">F5</span> in SciTE your code will run be executed and the results displayed in the Output window.<br /><br />Yes!Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4120715611290682833.post-11088105753568591972010-05-17T01:04:00.000-07:002010-05-17T01:19:05.884-07:00PHP broken emailThere are cases when an email might end up showing the headers inside the email's body. This means that headers are usually.<br /><br />We had a big headache with a PHP project lately as all the emails were broken ("butchered" as someone said).<br /><br />Here is how a test the email looked like:<br /><br /><pre wrap=""><span style="color: rgb(204, 102, 204);">MIME-Version: 1.0</span><br /><span style="color: rgb(204, 102, 204);">Content-type: text/html; charset=utf-8</span><br /><span style="color: rgb(204, 102, 204);">Message-Id: </span><a style="color: rgb(204, 102, 204);" class="moz-txt-link-rfc2396E" href="mailto:20100517075235.2FF74F04FB@snow.scriptoid.com"><...........></a><br /><span style="color: rgb(204, 102, 204);">Date: Mon, 17 May 2010 10:52:35 +0300 (EEST)</span><br /><span style="color: rgb(204, 102, 204);">From: </span><a style="color: rgb(204, 102, 204);" class="moz-txt-link-abbreviated" href="mailto:root@snow.scriptoid.com">root@snow.zzzptoid.com</a><span style="color: rgb(204, 102, 204);"> (root)</span><br /><br /><br /><br /><br /><span style="color: rgb(204, 102, 204);">Yes, a simple <b>HTML</b> email test</span><br /></pre>Now we took a look at the raw email and here is what we saw:<br /><pre id="line1"><span style="color: rgb(153, 51, 153);">Received: (qmail 9464 invoked from network); 17 May 2010 07:51:47 -0000</span><br /><span style="color: rgb(153, 51, 153);">Received: from unknown (HELO m1pismtp01-011.prod.mesa1.secureserver.net) ([10.8.12.11])</span><br /><span style="color: rgb(153, 51, 153);"> (envelope-sender <root@snow.zzzptoid.com>)</root@snow.zzzptoid.com></span><br /><span style="color: rgb(153, 51, 153);"> by p3plsmtp03-04.prod.phx3.secureserver.net (qmail-1.03) with SMTP</span><br /><span style="color: rgb(153, 51, 153);"> for <alex@zzzptoid.com>; 17 May 2010 07:51:47 -0000</alex@zzzptoid.com></span><br /><span style="color: rgb(153, 51, 153);">X-IronPort-Anti-Spam-Result: AqoFAAiS8EtZLcluX2dsb2JhbACRfQEBixsDbB5IvwkEiQ8</span><br /><span style="color: rgb(153, 51, 153);">Received: from pc110.fx-net.ro (HELO snow.zzzptoid.com) ([89.45.201.120])</span><br /><span style="color: rgb(153, 51, 153);"> by m1pismtp01-011.prod.mesa1.secureserver.net with ESMTP; 17 May 2010 00:51:46 -0700</span><br /><span style="color: rgb(153, 51, 153);">Received: by snow.zzzptoid.com (Postfix, from userid 0)</span><br /><span style="color: rgb(153, 51, 153);"> id 2FF74F04FB; Mon, 17 May 2010 10:52:35 +0300 (EEST)</span><br /><span style="color: rgb(153, 51, 153);">To: alex@zzzptoid.com</span><br /><span style="color: rgb(153, 51, 153);">Subject: Test HTML email</span><br /><span style="color: rgb(153, 51, 153);">X-PHP-Originating-Script: 0:testSendEmail.php</span><br /><span style="color: rgb(153, 51, 153);">X-Nonspam: Statistical 50%</span><br /><br /><span style="color: rgb(153, 51, 153);">MIME-Version: 1.0</span><br /><span style="color: rgb(153, 51, 153);">Content-type: text/html; charset=utf-8</span><br /><span style="color: rgb(153, 51, 153);">Message-Id: <...></span><br /><span style="color: rgb(153, 51, 153);">Date: Mon, 17 May 2010 10:52:35 +0300 (EEST)</span><br /><span style="color: rgb(153, 51, 153);">From: root@snow.zzzptoid.com (root)</span><br /><br /><br /><span style="color: rgb(153, 51, 153);">Yes, a simple <b>HTML</b> email test</span><br /></pre><br />Now the problem were those 3 lines :<br /><pre style="color: rgb(153, 51, 153);" id="line1">X-Nonspam: Statistical 50%<br /><br />MIME-Version: 1.0</pre> There should be no blank line between headers as the email parser will believe that the headers are done and the content is starting.<br /><br />Where do those extra line coming from? They are added by PHP for any email sent, so we need to remove them; and they are added the wrong way - introducing an unnecessary blank line.<br /><br />Go to php.ini and set <span style="font-weight: bold;">mail.add_x_headers</span> to <span style="font-weight: bold;">off</span>:<br /><br /><span style="color: rgb(153, 51, 153);">mail.add_x_headers = Off</span><br /><br />Now restart you Apache and let me know if it's working :)Unknownnoreply@blogger.com19tag:blogger.com,1999:blog-4120715611290682833.post-79722370779553621992010-05-17T00:16:00.001-07:002010-05-17T00:26:23.397-07:00Carriage return and Line feedIf I work too much under Linux (x)or Windows and I want to switch to the other operating system I bump into the new line issue.<br /><br />Here are the actors:<br /><br />CR - <span style="font-weight: bold;">carriage return</span>, ASCII code 10 (or <span style="font-weight: bold;">\r</span>) - means that the printer carriage should return at the beginning of the line<br /><br />LF - <span style="font-weight: bold;">line feed</span>, ASCII code 13 (or <span style="font-weight: bold;">\n</span>) - means that the printer carriage should be move on next line.<br /><br /><span style="font-weight: bold;">New line</span> - whenever you need to move to a new line (in console or editor)<br /><br /><br />Windows and Linux treat that new line differently:<br /><br />Window - the new line is made out of a CR and LF so actually the code for new line is CR+LF (\r\n)<br /><br />Linux - the new line is a simple line feed = LF (\n)Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4120715611290682833.post-73288778890878064512010-03-03T02:53:00.001-08:002010-03-03T02:58:15.067-08:00ABC Time Tracking - sound error notificationWe just added sound error notification to Punchy - <a href="http://abctimetracking.com">ABC Time Tracking</a>'s <a href="http://abctimetracking.com/desktop.php">desktop plugin</a>.<br /><br />Whenever there is an error that disconnect you from the server or you application stop counting time an error sound is played.<br /><br />Thanks Marco for suggestion.Unknownnoreply@blogger.com2tag:blogger.com,1999:blog-4120715611290682833.post-66223191273830904662010-03-01T05:18:00.000-08:002010-03-01T05:26:22.348-08:00SQLarity: PHP and mySQL made simplePart of our team from <a href="http://scriptoid.com">scriptoid</a> joined the <a href="http://code.google.com/p/sqlarity/">sqlarity</a> project.<br /><br />It's actually an official repository for a framework we built applications on.<br /><br />What it does?<br /><br />Simple said it takes tables from mySQL and creates PHP5 classes. <br /><br />Also creates a Delegate class that allows you to do all the CR(eate)U(pdate)D(elete) operations.<br /><br />From our experience with it, it speeds up the PHP5 coding with a factor of 5x to 7x. <br /><br />It follows our philosophy: "automate your business" so we love it.<br /><br />Long live sqlarity.Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4120715611290682833.post-55020281129414957322010-02-26T03:53:00.000-08:002010-02-26T03:58:41.348-08:00ABC Time Tracking - Multiple monitor screenshotsWe are proud to announce that our <a href="http://abctimetracking.com/desktop.php">desktop</a> plugin for <a href="http://abctimetracking.com">ABC Time Tracking</a> is now able to make screenshots for each monitor an user might have.<br /><br />The suggestion was made by Marco (Italy). <br /><br />Thanks Marco :)Unknownnoreply@blogger.com2tag:blogger.com,1999:blog-4120715611290682833.post-60659433314030447232010-02-25T02:41:00.000-08:002010-02-26T03:53:28.784-08:00Robot19 has feedback<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://robot19.com/assets/images/logo_medium.gif"><img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 48px; height: 70px;" src="http://robot19.com/assets/images/logo_medium.gif" border="0" alt="" /></a><br />Robot19.com - the <a href="http://robot19.com">web mobile todo list</a> - has a new section for feedback. <br /><br />The section can be accessed while you are logged in.<br /><br />So we can now place feedback: suggestions, bugs and wishes :)Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4120715611290682833.post-76019675522972585332010-02-25T02:25:00.000-08:002010-02-26T03:52:45.565-08:00Robot19 was born<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://robot19.com/assets/images/logo_medium.gif"><img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 48px; height: 70px;" src="http://robot19.com/assets/images/logo_medium.gif" alt="" border="0" /></a><br />Robot19 was born.<br /><br /><br /><br />In short this is <a href="http://robot19.com">web mobile todo list</a>. You can access your todo list wherever you are: home, work, holiday. But who is actually the Robot19 you can see <a href="http://robot19.com/faq.php#whois">here</a>. (yes, we are in contact with Robot19 but do not ask much about it as his location is kept secret similar to Are52)<br /><br />You do not need to install ANYTHING on your mobile or PC, just point your browser to <a href="http://robot19.com/">http://robot19.com</a> and here you go.<br /><br />Give it a try!<br /><br />p.s.<br />We are using current version of Robot19.com to build Robot19.com (eat what we produce)Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4120715611290682833.post-11627206118944301022010-02-19T02:17:00.000-08:002010-02-19T02:25:11.041-08:00A tiny benchmark systemWe just released a small benchmark system named <a href="http://stresos.com" target="new">Stresos.com</a><br /><br />As we are using OpenSuse+KDE a lot and they stopped to support KDE3.5 (in 11.2) we were asking what should we use? KDE4 or other stuff...<br /><br />As KDE4 is very imature and IMHO simply sucks....we tested a few desktops ...but the question is...how can we tell the difference in speed for our development team?<br /><br />As we are using Netbeans a lot it made sense to create a Java benchmark...so here it is.<br /><br />We had great fun testing different desktops with it.<br /><br />We've made it open source so anyone can donwload it and extend it.<br /><br />A! we are using Gnome now :)Unknownnoreply@blogger.com1tag:blogger.com,1999:blog-4120715611290682833.post-69113111582199837302010-01-20T03:16:00.000-08:002010-01-20T03:23:14.117-08:00Netbeans and CVS - Exclude From Commit On New FilesThere are cases when you don't want Netbeans to add files automatically to CVS for you.<br /><br />To change that behaviour folow these steps (Netbeans 6.8):<br />1. Go to Tools->Options->Miscellaneous->CVS<br />2. Check "Apply "Exclude From Commit" On New Files Automatically" option<br /><br />Now all your news files added by you need a "boss" approval to be commited.<br /><br />This is handy when you don't want project's (private & meta) files to be imported.Unknownnoreply@blogger.com1tag:blogger.com,1999:blog-4120715611290682833.post-71767968781283351372009-08-27T04:47:00.000-07:002009-08-27T05:04:22.561-07:00File size in human formatI needed to see some file sizes in a human format (in a PHP page) so I created this function some of you might find useful:<br /><br /><pre><br />/**Returns the size of data (provided in bytes) in a human readable<br /> * format<br /> * @size - the the size of data in bytes<br /> * @author alex from scriptoid.com<br /> */<br />function humanSize($size){<br /> if($size < pow(1024, 1)){<br /> return $size . 'Bytes';<br /> }<br /> else if ($size < pow(1024, 2)){<br /> return sprintf("%.2f", $size/pow(1024, 1)) . 'Kb'; //Kilo<br /> }<br /> else if ($size < pow(1024, 3)){<br /> return sprintf("%.2f", $size/pow(1024, 2)) . 'Mb'; //Mega<br /> }<br /> else if ($size < pow(1024, 4)){<br /> return sprintf("%.2f",$size/pow(1024, 3)) . 'Gb'; //Giga<br /> }<br /> else if ($size < pow(1024, 5)){<br /> return sprintf("%.2f",$size / pow(1024, 4)) . 'Tb'; //Tera<br /> }<br /> else if ($size < pow(1024, 6)){<br /> return sprintf("%.2f",$size / pow(1024, 5)) . 'Pb'; //Peta<br /> }<br /> else if ($size < pow(1024, 7)){<br /> return sprintf("%.2f",$size / pow(1024, 6)) . 'Eb'; //Exa<br /> }<br /> else if ($size < pow(1024, 8)){<br /> return sprintf("%.2f",$size /pow(1024, 7)) . 'Zb'; //Zeta<br /> }<br /> else if ($size < pow(1024, 9)){<br /> return sprintf("%.2f",$size /pow(1024, 8)) . 'Yb'; //Yota<br /> }<br /> else{<br /> return 'too big'; //:D<br /> }<br />}<br /></pre>Unknownnoreply@blogger.com1tag:blogger.com,1999:blog-4120715611290682833.post-9152468191607956132009-08-23T06:14:00.001-07:002009-08-23T06:22:28.741-07:00Low level HTTP(s) testingFor http use:<br /><span style="font-family:courier new;">$ telnet localhost 80</span><br /><span style="font-family:courier new;">GET / HTTP/1.0</span><br /><br />For https use (openssl tool):<br /><span style="font-family:courier new;">$ openssl s_client -connect localhost:443 -state -debug</span><br /><span style="font-family:courier new;">GET / HTTP/1.0</span><br /><br />Before the actual HTTP response you will receive detailed information about the SSL handshake.<br /><br /><br /><strong>More</strong>...ff you want to use HTTP/1.1 use<br /><span style="font-family:courier new;">GET / HTTP/1.1</span><br /><br /><strong>Even More</strong>...if you use virtual servers enter (after you get a prompt from GET / HTTP/1.1)<br /><span style="font-family:courier new;">Host: your_virtual_server_name</span>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4120715611290682833.post-62195391192198673282009-06-22T02:28:00.000-07:002009-06-22T02:29:41.427-07:00Time Tracking 2.0 going alfaTime tracking 2.0 entered alfa levelUnknownnoreply@blogger.com0tag:blogger.com,1999:blog-4120715611290682833.post-15584413038592155572009-05-28T00:19:00.000-07:002009-05-28T00:21:10.884-07:00Linux - count my processesWhenever I'm in need to count how many processes are running on my Linux box I use:<br /><br /><span style="color: rgb(0, 0, 153);">ps aux | wc -l</span><br /><br /><br />Unknownnoreply@blogger.com2tag:blogger.com,1999:blog-4120715611290682833.post-32904593318222409432009-05-28T00:00:00.001-07:002009-05-28T00:11:50.918-07:00Mount Samba remote folders - Suse Linux<span style="font-weight: bold;">The need:</span><br />I needed to mount a remote (located on 10.0.0.7) Samba folder (named solaria) so that I can use .iso file without downloading it to my local machine (Suse 11.1)<br /><br /><span style="font-weight: bold;">The solution</span><br />You can mount the remote driver by hand but I'm lazy so I want it mounted automatically so here is what I did:<br /><br />1. Created a [solaria] folder in /mnt folder<br /><br />2. Added the following line in /etc/<span style="font-weight: bold;">fstab</span><br /><span style="color: rgb(0, 0, 153);">//10.0.0.7/solaria/ /mnt/solaria cifs auto,password= 0 0 </span><br /><br />Now the next time you start you OS you will see the content of the remote folder in your /mnt/fstab<br /><br />See that I used a blank (no) password for the smb account as I allow guest logins<br /><br />You can also <span style="font-weight: bold;">mount</span> it with the next command<br /><span style="color: rgb(0, 0, 153); font-family: times new roman;">mount /mnt/solaria</span><br />and <span style="font-weight: bold;">unmount</span> it with<br /><span style="color: rgb(0, 0, 153); font-family: times new roman;">umount /mnt/solaria</span><br /><br /><span style="font-weight: bold;">Note</span><br />One interesting stuff is that the old smbfs was renamed to cifs. <a href="http://www.yeap.de/blog2.0/archives/71-No-more-smbfs-in-SuSE-10.2.html">Here</a> is where I found this information.Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4120715611290682833.post-56471340054365350132009-03-31T23:50:00.000-07:002009-03-31T23:51:30.587-07:00Linux scan for open portsA nice command to scan open ports for a host/ip is:<br /><br /><code style="background-color: rgb(204, 204, 204);">nmap -sS -O 127.0.0.1</code><br /><br />You will get an answer like this:<br /><pre><br />PORT STATE SERVICE<br />22/tcp open ssh<br />25/tcp open smtp<br />80/tcp open http<br />110/tcp open pop3<br />111/tcp open rpcbind<br />119/tcp open nntp<br />135/tcp filtered msrpc<br />137/tcp filtered netbios-ns<br />138/tcp filtered netbios-dgm<br />139/tcp filtered netbios-ssn<br />445/tcp filtered microsoft-ds<br />1720/tcp filtered H.323/Q.931<br />3306/tcp open mysql<br />8080/tcp open http-proxy<br />8081/tcp open blackice-icecap<br />8443/tcp open https-alt<br />Device type: general purpose<br /></pre><br /><br />If you need to see the open ports from inside (your server) use netstat:<br /><br /><code style="background-color: rgb(204, 204, 204);">netstat -a</code><br /><br />You will get something like:<br /><pre><br />Active Internet connections (servers and established)<br />Proto Recv-Q Send-Q Local Address Foreign Address State<br />tcp 0 0 *:cvspserver *:* LISTEN<br />tcp 0 0 *:mysql *:* LISTEN<br />tcp 0 0 *:netbios-ssn *:* LISTEN<br />tcp 0 0 *:sunrpc *:* LISTEN<br />tcp 0 0 *:http-alt *:* LISTEN<br />tcp 0 0 *:microsoft-ds *:* LISTEN<br />tcp 0 0 *:www-http *:* LISTEN<br />tcp 0 0 *:ssh *:* LISTEN<br />tcp 0 0 *:https *:* LISTEN<br />udp 0 0 *:netbios-ns *:*<br />udp 0 0 *:netbios-dgm *:*<br />udp 0 0 *:tftp *:*<br />.......<br /><br />Active UNIX domain sockets (servers and established)<br />Proto RefCnt Flags Type State I-Node Path<br />unix 2 [ ACC ] STREAM LISTENING 5170 @/tmp/hald-local/dbus-B cG6NtYfGm<br />unix 2 [ ACC ] STREAM LISTENING 7389 /var/lib/mysql/mysql.so ck<br />unix 2 [ ] DGRAM 8071089 /var/lib/dhcp/dev/log<br />unix 2 [ ] DGRAM 8071091 /var/lib/named/dev/log<br />unix 2 [ ] DGRAM 2177 @/org/kernel/udev/udevd<br />unix 2 [ ] DGRAM 5171 @/org/freedesktop/hal/u dev_event<br />............<br /></pre>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4120715611290682833.post-32846395474338859742009-03-26T02:15:00.000-07:002009-03-26T02:18:33.686-07:00Linux: sort your folder by sizeIn case you need to sort your folders by size, in Linux, you can use the following command:<br /><br /><code style="background-color: rgb(204, 204, 204);">du --max-depth=1 /home/ | sort -n -r</code><br /><br />of course replace '<code style="background-color: rgb(204, 204, 204);">/home/</code>' with your desired folder.Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4120715611290682833.post-84315505175180537332009-03-26T01:52:00.001-07:002009-03-26T02:12:05.039-07:00Why automate your business?Why do you need to automate your business?<br /><br />The answer is very simple: reduce human time which is VERY expensive.<br />Someone said that silicate (Si) is cheaper than carbon (C) and that is true.<br /><br />I started this journey - to automate my business - as I had a lot of problem with employees and I'm searching for a solution.<br /><br />A friend of mine said that if an employee has a personal problem that problem will become yours.<br /><br />I started by developing a <a href="http://time-tracking.us">time tracking software</a> for our company needs and it turned out that it worth - a lot. Now I know exactly where time was spent and more important I can detect very easily who is lagging behind with schedules.<br /><br />I do not start praising our application - I think any time tracking application can be very helpful.<br /><br />The main idea is that if you have many automated control mechanisms in place you can sleep better - not as a baby but better than without them.<br /><br />I hope I will be able to add more and more scripts & software to <a href="http://scriptoid.com">Scriptoid </a>so that anyone that need to automate his business to find a good solution.<br /><br />Also we will create a repository for developers to reuse codes, snippets, recipes and programs we are using every day and find it useful.Unknownnoreply@blogger.com0