<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>bojanpejic.com &#187; bojan</title>
	<atom:link href="http://bojanpejic.com/author/bojan/feed/" rel="self" type="application/rss+xml" />
	<link>http://bojanpejic.com</link>
	<description>Scrap Book About Web – Programming – Development – Places, and more 8-)</description>
	<lastBuildDate>Sun, 16 May 2010 14:37:56 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Compress JavaScript with Google Closure</title>
		<link>http://bojanpejic.com/compress-javascript-with-google-closure/</link>
		<comments>http://bojanpejic.com/compress-javascript-with-google-closure/#comments</comments>
		<pubDate>Sun, 16 May 2010 14:37:56 +0000</pubDate>
		<dc:creator>bojan</dc:creator>
				<category><![CDATA[Apps and Software]]></category>
		<category><![CDATA[closure]]></category>
		<category><![CDATA[compressor]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[minify]]></category>

		<guid isPermaLink="false">http://bojanpejic.com/?p=140</guid>
		<description><![CDATA[Google Closure is  a set of closure tools which contains a JavaScript optimizer, a comprehensive JavaScript library and a templating system for JavaScript &#38; Java. It&#8217;s available on Google Code page. In this post will focus on JavaScript optimizer and how can we optimize a JavaScript file, and if you interested in other possibilities of...]]></description>
			<content:encoded><![CDATA[<p><img class="size-full wp-image-142 alignleft" title="google-closure" src="http://bojanpejic.com/wp-content/uploads/2010/05/google-closure.png" alt="" width="151" height="143" />Google Closure is  a set of closure tools which contains a JavaScript optimizer, a comprehensive JavaScript library and a templating system for JavaScript &amp; Java. It&#8217;s available on <a title="Google Closure" href="http://code.google.com/closure/" target="_blank">Google Code</a> page. In this post will focus on JavaScript optimizer and how can we optimize a JavaScript file, and if you interested in other possibilities of Closure you should also visit it&#8217;s page. (This post generally continues one of my previous posts <a href="http://bojanpejic.com/how-to-compress-javascript-code/" target="_blank">How to Compress JavaScript code</a>.) There are three methods with we can do our JavaScript optimizing with Google Closure.</p>
<h4>#1 method</h4>
<p>First is the simplest, just visit <a title="Closure compiler online" href="http://closure-compiler.appspot.com/home" target="_blank">closure-compiler.appspot.com</a> and you&#8217;ll get an online Closure Compiler in your browser. There you have to give an URL to your script or paste it to textbox, chose an optimization method from one of the available ones (whitespace, simple or advanced) and if you don&#8217;t know which one to use, chose link to <a href="http://code.google.com/closure/compiler/docs/compilation_levels.html" target="_blank">Which one is right for my code?</a> where is explained how the optimization work. Also you can check from one of the available formatting options, pretty print and print input delimiter. If you check the pretty print formatting option your compiled code will get a formatted code output and not single line one.</p>
<p style="text-align: center;"><img class="size-medium wp-image-153  aligncenter" title="google closure compiler" src="http://bojanpejic.com/wp-content/uploads/2010/05/closurecompiler-300x240.png" alt="" width="300" height="240" /></p>
<h4>#2 method</h4>
<p>Second method is using Closure Compiler Service API! It&#8217;s something like I mentioned in first method. You create a page with a textbox, paste your code and submit it! Form posts your script to Closure Compiler and returns the minified code back to you and shows it. How the HTML code looks? Take a look below or on Closure Compiler page <a href="http://code.google.com/closure/compiler/docs/gettingstarted_api.html" target="_blank">here</a>.</p>
<pre class="brush: xml;">&lt;html&gt;
  &lt;body&gt;
    &lt;form action=&quot;http://closure-compiler.appspot.com/compile&quot; method=&quot;POST&quot;&gt;
    &lt;p&gt;Type JavaScript code to optimize here:&lt;/p&gt;
    &lt;textarea name=&quot;js_code&quot; cols=&quot;50&quot; rows=&quot;5&quot;&gt;
    function hello(name) {
      // Greets the user
      alert('Hello, ' + name);
    }
    hello('New user');
    &lt;/textarea&gt;
    &lt;input type=&quot;hidden&quot; name=&quot;compilation_level&quot; value=&quot;WHITESPACE_ONLY&quot;&gt;
    &lt;input type=&quot;hidden&quot; name=&quot;output_format&quot; value=&quot;text&quot;&gt;
    &lt;input type=&quot;hidden&quot; name=&quot;output_info&quot; value=&quot;compiled_code&quot;&gt;
    &lt;br&gt;&lt;br&gt;
    &lt;input type=&quot;submit&quot; value=&quot;Optimize&quot;&gt;
    &lt;/form&gt;
  &lt;/body&gt;
&lt;/html&gt;
</pre>
<h4>#3 method</h4>
<p>This one is my favorite! It does the same like any other mentioned method before, but with this method you can easily include several files to bi minified/compress to one :) What you need for start is to download <a href="http://code.google.com/closure/compiler/docs/gettingstarted_app.html" target="_blank">Closure Compiler Application</a>. You create a working directory where you put your downloaded Closure Compiler Application. Copy the JavaScript file(s) you want to compile to Closure Compiler working directory, and now let&#8217;s do some compiling!</p>
<p>First example with one input file:</p>
<pre class="brush: plain;">java -jar compiler.jar --js myfile.js --js_output_file myfile.min.js</pre>
<p>Second example with two or more input files:</p>
<pre class="brush: plain;">java -jar compiler.jar --js myfile1.js --js myfile2.js  --js myfile3.js --js_output_file myfile.min.js</pre>
<p>So, through Java we execute the Closure Compiler Application <em>compiler.jar</em>. With option <strong>&#8211;js</strong> we define the input JavaScript file we want to compile, and with <strong>&#8211;js_output_file</strong> is defined the output file name which is compiled. In second example is shown how can be added more than one JavaScript file to be compiled.</p>
<p>For Closure Compiler help type:</p>
<pre class="brush: plain;">java -jar compiler.jar --help</pre>
<p>It is also available setting Closure optimizations through application, if you want to make Advanced optimization:</p>
<pre class="brush: plain;">java -jar compiler.jar --compilation_level ADVENCED_OPTIMIZATIONS --js myfile.js</pre>
<p>I find this Closure Compiler Application very handy, and if I need to compress JavaScript file it is my first choice right now. Maybe it will be interesting in feature to make some compares about sizes of compressed and non-compressed codes, but if you do it online on Closure Compiler page you will see some calculations about size right away. For more details about <a href="http://code.google.com/closure/compiler/" target="_blank">Google Closure Compiler</a> visit it&#8217;s homepage.</p>
]]></content:encoded>
			<wfw:commentRss>http://bojanpejic.com/compress-javascript-with-google-closure/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Twitter Follow Bug Discovered</title>
		<link>http://bojanpejic.com/twitter-vulnerability-discovered/</link>
		<comments>http://bojanpejic.com/twitter-vulnerability-discovered/#comments</comments>
		<pubDate>Mon, 10 May 2010 17:03:44 +0000</pubDate>
		<dc:creator>bojan</dc:creator>
				<category><![CDATA[Interesting on Web]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://bojanpejic.com/?p=124</guid>
		<description><![CDATA[Wow, I didn&#8217;t imagine that something like this is possible! Following my streamline I noticed tweet by @feeloow which had a link. The link was about Twitter vulnerability, which is a have to say pretty huge! Tweeting a command &#8220;accept username&#8221; you can make anyone following you! I was curious so I tried it, and...]]></description>
			<content:encoded><![CDATA[<p>Wow, I didn&#8217;t imagine that something like this is possible! Following my streamline I noticed tweet by @feeloow which had a <a href="http://news.ycombinator.com/item?id=1334735" target="_blank">link</a>. The link was about Twitter vulnerability, which is a have to say pretty huge! Tweeting a command &#8220;accept username&#8221; you can make anyone following you! I was curious so I tried it, and it really worked, but after some time ~15 minutes, my counters for following and followers are zeroed. Watching the timeline I noticed that few tweeps I followed has complained about that or &#8220;You don&#8217;t have any followers just yet. You probably will soon, though!&#8221;. Even I have zeroed counters, timeline works fine until now. Now waiting what will happen :)</p>
<h4>UPDATE #1</h4>
<p>About ~25 minutes later (19:10 CEST) i also got message &#8220;You don&#8217;t have any followers just yet. You probably will soon, though!&#8221;</p>
<h4>UPDATE #2</h4>
<p>Status from @twitter account <a href="http://twitter.com/twitter/status/13736700173" target="_blank">http://twitter.com/twitter/status/13736700173</a></p>
<h4>UPDATE #3</h4>
<p>@19:25 (CEST) by @twitter <a href="http://status.twitter.com/post/587210796/follow-bug-discovered-remedied" target="_blank">http://status.twitter.com/post/587210796/follow-bug-discovered-remedied</a></p>
<h4>UPDATE #4</h4>
<p>Looks like everything started with this <a href="http://gizmodo.com/5535298/how-to-force-anyone-to-follow-you-on-twitter?skyline=true&amp;s=i" target="_blank">http://gizmodo.com/5535298/how-to-force-anyone-to-follow-you-on-twitter?skyline=true&amp;s=i</a></p>
<h4>UPDATE #5</h4>
<p>Some funny stuff about this :)</p>
<p>http://bit.ly/c0Eegf</p>
<p>http://bit.ly/apY2p9</p>
<h4>UPDATE #6</h4>
<p>About 2 hours later (20:30 CEST) everything looks back in normal, welcome back followers :) The followers added by the follow bug haven&#8217;t been removed.</p>
]]></content:encoded>
			<wfw:commentRss>http://bojanpejic.com/twitter-vulnerability-discovered/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing LAMP on Kubuntu or Ubuntu</title>
		<link>http://bojanpejic.com/installing-lamp-on-kubuntu-or-ubuntu/</link>
		<comments>http://bojanpejic.com/installing-lamp-on-kubuntu-or-ubuntu/#comments</comments>
		<pubDate>Thu, 17 Dec 2009 12:06:22 +0000</pubDate>
		<dc:creator>bojan</dc:creator>
				<category><![CDATA[Apps and Software]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[kubuntu]]></category>
		<category><![CDATA[LAMP]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://bojanpejic.com/?p=93</guid>
		<description><![CDATA[This post represents a small guide of how to setup your LAMP (Linux-Apache-MySQL-PHP) under Kubuntu (this works also for Ubuntu). Usually LAMP tutorials guide you to install one by one all the applications, that looks something like this: sudo apt-get install apache2 sudo apt-get install php5 sudo apt-get install mysql-server There is one more easy...]]></description>
			<content:encoded><![CDATA[<p>This post represents a small guide of how to setup your LAMP (Linux-Apache-MySQL-PHP) under Kubuntu (this works also for Ubuntu).</p>
<p>Usually LAMP tutorials guide you to install one by one all the applications, that looks something like this:</p>
<pre class="brush: plain;">
sudo apt-get install apache2
sudo apt-get install php5
sudo apt-get install mysql-server
</pre>
<p>There is one more easy solution, and the only difference is that it installs all + some other packages for LAMP.</p>
<pre class="brush: plain;">
sudo apt-get install lamp-server^
</pre>
<p>When installation of new packages finishes you have you own LAMP setup! Test it entering <em>http://localhost</em> in your browser it should say It works!</p>
<h4>Tip #1</h4>
<p>For adding PhpMyAdmin execute the following command in console:</p>
<pre class="brush: plain;">
sudo apt-get install phpmyadmin
</pre>
<p>It is possible when you type in your browser <em>http://localhost/phpmyadmin/</em> that phpmyadmin don&#8217;t runs. Then you have to create a link in your www directory:</p>
<pre class="brush: plain;">
sudo ln -s /usr/share/phpmyadmin /var/www/phpmyadmin
</pre>
<p>After doing this <em>http://localhost/phpmyadmin</em>/ should work now!</p>
<h4>Tip #2</h4>
<p>To have permissions to your www directory do following:</p>
<pre class="brush: plain;">
sudo chown username:username /var/www
</pre>
<h4>Tip #3</h4>
<p>Enable Apache mod_rewrite module and restart Apache for taking effects:</p>
<pre class="brush: plain;">
sudo a2enmod rewrite
sudo /etc/init.d/apache2 restart
</pre>
<p>You can enable or disable some other modules like this.</p>
<p>Now you have your LAMP up and the work can start :)</p>
]]></content:encoded>
			<wfw:commentRss>http://bojanpejic.com/installing-lamp-on-kubuntu-or-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Wubi to Install Kubuntu</title>
		<link>http://bojanpejic.com/using-wubi-to-install-kubuntu/</link>
		<comments>http://bojanpejic.com/using-wubi-to-install-kubuntu/#comments</comments>
		<pubDate>Tue, 15 Dec 2009 10:30:47 +0000</pubDate>
		<dc:creator>bojan</dc:creator>
				<category><![CDATA[Apps and Software]]></category>
		<category><![CDATA[kubuntu]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[wubi]]></category>

		<guid isPermaLink="false">http://bojanpejic.com/?p=90</guid>
		<description><![CDATA[What is Wubi? Wubi is an officially supported Ubuntu installer for Windows users that can bring you to the Linux world with a single click. Wubi allows you to install and uninstall Ubuntu as any other Windows application, in a simple and safe way. Are you curious about Linux and Ubuntu? Trying them out has...]]></description>
			<content:encoded><![CDATA[<h3 style="text-align: left;">What is Wubi?</h3>
<blockquote style="text-align: left;"><p>Wubi is an officially supported Ubuntu installer for Windows users that can bring you to the Linux world with a single click. Wubi allows you to install and uninstall Ubuntu as any other Windows application, in a simple and safe way. Are you curious about Linux and Ubuntu? Trying them out has never been easier!</p></blockquote>
<h3 style="text-align: left;">Why to use it?</h3>
<p style="text-align: left;">If you&#8217;re new to Ubuntu and other Ubuntu based installations (Kubuntu, Xubuntu) this is a great way to play with it, and if you don&#8217;t like it you can easily remove it!</p>
<h3 style="text-align: left;">What do you need for start?</h3>
<p style="text-align: left;">You need a Kubuntu installation disc, which you can download from official <a href="http://releases.ubuntu.com/kubuntu/9.10/" target="_blank">Ubuntu</a> site or <a href="http://www.kubuntu.org/getkubuntu/download" target="_blank">Kubuntu.org</a>, you can chose there from 32-bit or 64-bit version. There are few alternatives, you can download it via FTP or torrent if you like that more.</p>
<p style="text-align: left;">On Kubuntu.org you have option to download only Wubi (~1.5Mb) and start install Kubuntu with it, but then it will download all the data (installation disc) from Internet. So, if you don&#8217;t have a good bandwith Internet I don&#8217;t recommend this.</p>
<h3 style="text-align: left;">Start installing</h3>
<p style="text-align: left;">After you downloaded your Kubuntu installation disc, you can burn it on CD or if you have a virtual drive mount in it. Now you have to run Wubi.exe (find on CD or through Windows Autoplay) which is in root of CD. A window will appear with Kubuntu CD menu and three option, you chose the second one from there <em>Install inside Windows</em>. After that it&#8217;ll appear a window which looks something like next picture.</p>
<div id="attachment_96" class="wp-caption aligncenter" style="width: 523px"><img class="size-full wp-image-96" title="wubi kubuntu" src="http://bojanpejic.com/wp-content/uploads/2009/12/wubi.png" alt="wubi-installer.org" width="513" height="397" /><p class="wp-caption-text">wubi-installer.org</p></div>
<p style="text-align: left;">Now you have to configure some options before you start you Kubuntu installation through Wubi installer. Chose your Installation Drive (it can be any partition which can Windows access), but it has minimum 12GB free space. Installation size is worth to set bigger if you want to install a bunch of programs and stuff, if you don&#8217;t you can leave on 8GB. Desktop Environment will be Kubuntu in our case. Set Language, Username and Password, click on Install and here it goes! It will copy some files and after that will ask to restart your system, and finish with whole installation after setting up more stuff (when installation finishes don&#8217;t forget to remove your install CD from drive).</p>
<p style="text-align: left;">After next restart you&#8217;ll see a boot menu which gives you option to chose which OS to start Windows or Kubuntu. You can now run your new Kubuntu OS :)</p>
<h3 style="text-align: left;">My <span id="result_box"><span style="background-color: #ffffff;" title="iskustvo">Experience</span></span></h3>
<p style="text-align: left;"><span><span style="background-color: #ffffff;" title="iskustvo">I&#8217;m using Kubuntu like this for about 2-3 weeks, and have to say I&#8217;m satisfied with it. Only I have to say there were few difficulties during the install. </span></span></p>
<p style="text-align: left;"><span><span style="background-color: #ffffff;" title="iskustvo">My first attempt was with Kubuntu 9.10, but after entering in it there was no wireless connection on notebook (Dell Inspiron 1525). I checked it, it recognized that I have wireless card, but I could not manage it or to connect on my home network. I didn&#8217;t have choice so I connected with LAN cable, and make all the updates/bug fixes for Kubuntu. After finished update and restart I was able to handle my WLAN connections.</span></span></p>
<p style="text-align: left;"><span><span style="background-color: #ffffff;" title="iskustvo">One more thing to pay attention is sound. If you don&#8217;t have any it&#8217;s worthy to check your KMix and run <em>alsamixer</em> from console. Be sure that is in alsamixer everything turned on (volume is on top and it&#8217;s not MM &#8211; muted). With &#8216;M&#8217; key you can change the values where you find it is MM.</span></span></p>
<p style="text-align: left;">For more detailed installation process and informations about Wubi visit <a href="http://wubi-installer.org" target="_blank">wubi-installer.org</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://bojanpejic.com/using-wubi-to-install-kubuntu/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Zend Framework Book Review by Robert Bašić</title>
		<link>http://bojanpejic.com/zend-framework-book-review-by-robert-basic/</link>
		<comments>http://bojanpejic.com/zend-framework-book-review-by-robert-basic/#comments</comments>
		<pubDate>Sun, 22 Nov 2009 20:30:40 +0000</pubDate>
		<dc:creator>bojan</dc:creator>
				<category><![CDATA[Interesting on Web]]></category>
		<category><![CDATA[book]]></category>
		<category><![CDATA[framework]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[zend]]></category>

		<guid isPermaLink="false">http://bojanpejic.com/?p=76</guid>
		<description><![CDATA[Few days ago my friend Robert Bašić has posted his review of a book named &#8220;Zend Framework 1.8 Web Application Development&#8221; on his blog. Here is a short quote from that review: The book starts off with a basic application (yep, “Hello world!”), explains the bootstrapping, configuring, working with action controllers, views and handling errors…...]]></description>
			<content:encoded><![CDATA[<div id="attachment_88" class="wp-caption alignright" style="width: 310px"><img class="size-full wp-image-88" title="Zend Framework 1.8 Web Application Development" src="http://bojanpejic.com/wp-content/uploads/2009/11/zf_book-300x225.jpg" alt="Picture from robertbasic.com" width="300" height="225" /><p class="wp-caption-text">Picture from robertbasic.com</p></div>
<p>Few days ago my friend Robert Bašić has posted his review of a book named &#8220;<a href="http://www.packtpub.com/zend-framework-1-8-web-application-development/book" target="_blank">Zend Framework 1.8 Web Application Development</a>&#8221; on his blog. Here is a short quote from that review:</p>
<blockquote><p>The book starts off with a basic application (yep, “Hello world!”), explains the bootstrapping, configuring, working with action controllers, views and handling errors… The second chapter continues with explaining the MVC architecture, the front controller, router, dispatcher… It even has a nice flowchart about the whole dispatch process, great stuff.</p></blockquote>
<p>It&#8217;s a not too long, but a well written and informative review. So, if you&#8217;re interested in whole review and what&#8217;s Robert saying about the book, I recommend you to visit his <a href="http://robertbasic.com/blog/zend-framework-18-web-application-development-book-review/" target="_blank">blog</a> and read his nice post!</p>
]]></content:encoded>
			<wfw:commentRss>http://bojanpejic.com/zend-framework-book-review-by-robert-basic/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
