<?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>Blogswag</title>
	<atom:link href="http://www.blogswag.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.blogswag.com</link>
	<description>Just another WordPress site</description>
	<lastBuildDate>Thu, 29 Mar 2012 17:15:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Command to list linux disk partitions</title>
		<link>http://www.blogswag.com/2012/03/29/command-to-list-linux-disk-partitions/</link>
		<comments>http://www.blogswag.com/2012/03/29/command-to-list-linux-disk-partitions/#comments</comments>
		<pubDate>Thu, 29 Mar 2012 17:15:19 +0000</pubDate>
		<dc:creator>indiaNPirates</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[commands]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[partitions]]></category>

		<guid isPermaLink="false">http://www.blogswag.com/?p=414</guid>
		<description><![CDATA[If you are new to linux and want to do some disk partition you should know how to do it in command line. This is a must because sometimes your graphical interface gets corrupted and only prompt is available. Hard-disk is normally divided into logical drives called partitions. Partition information is always stored in sector [...]]]></description>
			<content:encoded><![CDATA[<p>If you are new to linux and want to do some disk partition you should know how to do it in command line. This is a must because sometimes your graphical interface gets corrupted and only prompt is available.</p>
<p>Hard-disk is normally divided into logical drives called partitions. Partition information is always stored in sector 0 of the hard-disk. Lets have a look at hard-disk naming convention in linux</p>
<p><strong>/dev/hda :  dev=&gt; Device, hda =&gt; Hard-Disk 1</strong><br />
Similarly<br />
<strong>/dev/hdb : hdb =&gt; Hard-Disk2</strong></p>
<p><strong>NOTE :</strong> hda,hdb are normally IDE devices</p>
<p><strong>/dev/sda :  dev=&gt; Device, hda =&gt; Hard-Disk 1</strong><br />
Similarly<br />
<strong>/dev/sdb : hdb =&gt; Hard-Disk2</strong></p>
<p><strong>NOTE:</strong> sdb,sda are SCSI or SATA Disks</p>
<h3>List partitions</h3>
<p>To view partitions you should have root privileges or a sudo access. Open a terminal and type command listed below</p>
<pre>[root@indianpirates ~]# fdisk -l

OUTPUT:

Disk /dev/sda: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1           6       48163+  83  Linux
/dev/sda2               7         515     4088542+  83  Linux
/dev/sda3             516        2356    14787832+  83  Linux
/dev/sda4            2357        2610     2040255    5  Extended
/dev/sda5            2357        2610     2040223+  82  Linux swap / Solaris</pre>
<p><strong>sfdisk command</strong></p>
<p>The sfdisk command act as a partition table manipulator for Linux. You can also use this tool to list partitions .</p>
<p>sfdisk -l /dev/sda<br />
sfdisk -lu /dev/sda<br />
sfdisk -ls /dev/sda</p>
<pre>[root@indianpirates ~]# sfdisk -l /dev/sda

Disk /dev/sda: 2610 cylinders, 255 heads, 63 sectors/track
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

Device Boot Start     End   #cyls    #blocks   Id  System
/dev/sda1   *      0+      5       6-     48163+  83  Linux
/dev/sda2          6     514     509    4088542+  83  Linux
/dev/sda3        515    2355    1841   14787832+  83  Linux
/dev/sda4       2356    2609     254    2040255    5  Extended
/dev/sda5       2356+   2609     254-   2040223+  82  Linux swap / Solaris</pre>
<p>&nbsp;</p>
<p><strong>Listing partition of larger size say 2TB<br />
</strong>fdisk and sfdisk cannot be used to view partitions of more than 2TB. To solve this problem you have to use another special command called &#8220;<strong>parted</strong>&#8221; which is GNU parted command with GPT partitions.</p>
<p><strong>Sample output:<br />
</strong></p>
<pre>[root@indianpirates ~]# parted -l
Model: VMware, VMware Virtual S (scsi)
Disk /dev/sda: 21.5GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type      File system  Flags
1      32.3kB  49.4MB  49.3MB  primary   ext3         boot
2      49.4MB  4236MB  4187MB  primary   ext3
3      4236MB  19.4GB  15.1GB  primary   ext3
4      19.4GB  21.5GB  2089MB  extended
5      19.4GB  21.5GB  2089MB  logical   linux-swap</pre>
<p>&nbsp;</p>
<p>We will review more such useful commands in near future. thanks for reading this article.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blogswag.com/2012/03/29/command-to-list-linux-disk-partitions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Web Design Inspiration Series 1</title>
		<link>http://www.blogswag.com/2012/03/27/web-design-inspiration-series-1/</link>
		<comments>http://www.blogswag.com/2012/03/27/web-design-inspiration-series-1/#comments</comments>
		<pubDate>Tue, 27 Mar 2012 17:58:40 +0000</pubDate>
		<dc:creator>indiaNPirates</dc:creator>
				<category><![CDATA[Web design]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[featured]]></category>
		<category><![CDATA[inspiration]]></category>
		<category><![CDATA[trendy]]></category>
		<category><![CDATA[trendy web design]]></category>
		<category><![CDATA[web design]]></category>

		<guid isPermaLink="false">http://www.blogswag.com/?p=385</guid>
		<description><![CDATA[If you want to make your website famous and want to increase hits of your website you should always design a website which stands different from others. You should add some cool interactive and fun effects which make sense. Lets have a look at some of the best interactive and make use of most fun [...]]]></description>
			<content:encoded><![CDATA[<p>If you want to make your website famous and want to increase hits of your website you should always design a website which stands different from others. You should add some cool interactive and fun effects which make sense.</p>
<p>Lets have a look at some of the best interactive and make use of most fun effects efficiently and are nominated at <strong>Awwward</strong> for best website.</p>
<h4><a href="http://www.bagigia.com/">Bagigia- the bag</a></h4>
<div id="attachment_389" class="wp-caption alignnone" style="width: 610px"><a href="http://www.bagigia.com/"><img class="size-full wp-image-389" title="Bagigia - the bag" src="http://www.blogswag.com/wp-content/uploads/Bagigia_thumb.jpg" alt="Bagigia - the bag" width="600" height="263" /></a><p class="wp-caption-text">Bagigia - the bag</p></div>
<p>&nbsp;</p>
<p>Visit the website by clicking on the image or title. When you visit the website check out navigation to right of website to feel the amazing effect of scroll. Scroll is used very intelligently.</p>
<h3><a title="Indofolio" href="http://indofolio.com/">indofolio</a></h3>
<div id="attachment_394" class="wp-caption alignnone" style="width: 610px"><a href="http://indofolio.com/"><img class="size-full wp-image-394" title="IndoFolio" src="http://www.blogswag.com/wp-content/uploads/IndoFolio_thumb.jpg" alt="IndoFolio" width="600" height="260" /></a><p class="wp-caption-text">IndoFolio</p></div>
<p>&nbsp;</p>
<p>Visit the website by clicking on the image or title. This website is very Indian. it is a portfolio website of a designer, checkout how innovative is put to use to show a portfolio full marks to designer.</p>
<h3><a title="secondstory" href="http://www.secondstory.com/">Secondstory</a></h3>
<div id="attachment_399" class="wp-caption alignnone" style="width: 610px"><a href="http://www.secondstory.com/"><img class="size-full wp-image-399" title="SecondStory" src="http://www.blogswag.com/wp-content/uploads/SecondStory_thumb.jpg" alt="SecondStory" width="600" height="254" /></a><p class="wp-caption-text">SecondStory</p></div>
<p>&nbsp;</p>
<p>Visit the website by clicking on the image or title. Another good example of how informative website with effects should look like. Smart use of effects make a feel that you are running a desktop software.</p>
<h3><a title="Layrr" href="http://layrr.com/"> Layrr</a></h3>
<div id="attachment_402" class="wp-caption alignnone" style="width: 610px"><a href="http://layrr.com/"><img class="size-full wp-image-402" title="Layrr" src="http://www.blogswag.com/wp-content/uploads/Layrr_thumb.jpg" alt="Layrr" width="600" height="263" /></a><p class="wp-caption-text">Layrr</p></div>
<p>&nbsp;</p>
<p>Visit the website by clicking on the image or title. Good example of how to show the world what you do in a stylish way.</p>
<h3><a title="myownbike" href="myownbike.de">myownbike.de</a></h3>
<div id="attachment_404" class="wp-caption alignnone" style="width: 610px"><a href="http://www.myownbike.de/"><img class="size-full wp-image-404" title="myownbike" src="http://www.blogswag.com/wp-content/uploads/myownbike_thumb.jpg" alt="myownbike" width="600" height="263" /></a><p class="wp-caption-text">myownbike</p></div>
<p>&nbsp;</p>
<p>Visit the website by clicking on the image or title. Simple and beautiful color combination.</p>
<h3><a href="Voice.no">Voice.no</a></h3>
<div id="attachment_405" class="wp-caption alignnone" style="width: 610px"><a href="http://voice.no"><img class="size-full wp-image-405" title="voice.no" src="http://www.blogswag.com/wp-content/uploads/voice_thumb.jpg" alt="voice.no" width="600" height="260" /></a><p class="wp-caption-text">voice.no</p></div>
<p>&nbsp;</p>
<p>Visit the website by clicking on the image or title.Another Gem of website. A must watch &amp; browse website.</p>
<h3><a title="blind barber" href="http://blindbarber.com/"> Blind Barber</a></h3>
<div id="attachment_407" class="wp-caption alignnone" style="width: 610px"><a href="http://blindbarber.com/"><img class="size-full wp-image-407" title="BlindBarber " src="http://www.blogswag.com/wp-content/uploads/BlindBarber_thumb.jpg" alt="Blind Barber" width="600" height="263" /></a><p class="wp-caption-text">Blind Barber</p></div>
<p>&nbsp;</p>
<p>Visit the website by clicking on the image or title. I am out of words now amazing is the word i can use for this website.</p>
<h3><a title="herr-leder.de" href="http://herr-leder.de"> herr-leder.de</a></h3>
<div id="attachment_410" class="wp-caption alignnone" style="width: 610px"><a href="herr-leder.de"><img class="size-full wp-image-410" title="herr-leder" src="http://www.blogswag.com/wp-content/uploads/HERR_thumb.jpg" alt="herr-leder" width="600" height="263" /></a><p class="wp-caption-text">herr-leder</p></div>
<p>&nbsp;</p>
<p>Checkout more such Web design inspiration in coming days.</p>
<p><strong>PLEASE DON&#8217;T COPY DESIGN USE YOUR BRAINS AS DID BY ORIGINAL DESIGNERS. THESE DESIGNS ARE ONLY FOR REFERENCE AND IDEAS.</strong></p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blogswag.com/2012/03/27/web-design-inspiration-series-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows 8 Will Be available to public in october</title>
		<link>http://www.blogswag.com/2012/03/26/windows-8-will-be-available-to-public-in-october/</link>
		<comments>http://www.blogswag.com/2012/03/26/windows-8-will-be-available-to-public-in-october/#comments</comments>
		<pubDate>Mon, 26 Mar 2012 16:17:54 +0000</pubDate>
		<dc:creator>indiaNPirates</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[featured]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[news]]></category>
		<category><![CDATA[Steven Sinofsky]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[windows 8]]></category>

		<guid isPermaLink="false">http://www.blogswag.com/?p=381</guid>
		<description><![CDATA[Microsoft has announced that it will finish work on Windows 8 by the end of this summer and will most likely launch the operating system in October. According to reports, Microsoft is expected to have both the x86 and the ARM editions ready simultaneously. Earlier, the reports were that Windows 8 would be ready by [...]]]></description>
			<content:encoded><![CDATA[<p>Microsoft has announced that it will finish work on Windows 8 by the end of this summer and will most likely launch the operating system in October.</p>
<p>According to reports, Microsoft is expected to have both the x86 and the ARM editions ready simultaneously. Earlier, the reports were that Windows 8 would be ready by the end of July 2012.</p>
<p>So, there’ll be only 5 ARM devices in the release, compared with over forty Intel machines. However, taking into consideration the fact that the industry wasn’t expecting to see ARM hardware until much later, that wasn’t very surprising. In other words, Microsoft is going to target Christmas shoppers with the new software able to work with touch-screen electronic devices.</p>
<p>The industry experts pointed out that if Microsoft misses the fall time frame, the software giant is going to be stuck without having ability to ship anything in the current year. Indeed, the company needs a Windows tablet out there, able to compete with the Apple’s new iPad. Microsoft is planning to host an event for its industry partners early next month, where it will spell out its release strategy for the new operating system, providing more details on both timing and marketing.</p>
<p>Meanwhile, the industry experts have noticed that the developers seem to have less difficulty getting Windows 8 ready for x86, but it appeared harder to make it run on ARM. Meanwhile, Steven Sinofsky, president of the Windows business, continues saying that the company is going to have both ARM and Intel-based systems available when the new operating system is released this fall.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blogswag.com/2012/03/26/windows-8-will-be-available-to-public-in-october/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dark Shadows &#8211; Trailer</title>
		<link>http://www.blogswag.com/2012/03/22/dark-shadows-trailer/</link>
		<comments>http://www.blogswag.com/2012/03/22/dark-shadows-trailer/#comments</comments>
		<pubDate>Thu, 22 Mar 2012 16:36:32 +0000</pubDate>
		<dc:creator>indiaNPirates</dc:creator>
				<category><![CDATA[Entertainment]]></category>
		<category><![CDATA[barnabas collins]]></category>
		<category><![CDATA[Dark Shadows]]></category>
		<category><![CDATA[featured]]></category>
		<category><![CDATA[johnny depp]]></category>
		<category><![CDATA[trailer]]></category>

		<guid isPermaLink="false">http://www.blogswag.com/?p=376</guid>
		<description><![CDATA[An imprisoned vampire, Barnabas Collins, is set free and returns to his ancestral home, where his dysfunctional descendants are in need of his protection. staring our very own Johnny Depp, Michelle Pfeiffer and Eva Green. Director: Tim Burton Genre: Comedy &#38; Fantasy Release Date: 11th May 2012 (USA)]]></description>
			<content:encoded><![CDATA[<p>An imprisoned vampire, Barnabas Collins, is set free and returns to his ancestral home, where his dysfunctional descendants are in need of his protection. staring our very own Johnny Depp, Michelle Pfeiffer and Eva Green.</p>
<p><strong>Director: </strong>Tim Burton<strong><br />
Genre:</strong> Comedy &amp; Fantasy<br />
<strong>Release Date:</strong> 11th May 2012 (USA)</p>
<p><iframe width="500" height="281" src="http://www.youtube.com/embed/8Q-0_m_Pz24?fs=1&#038;feature=oembed" frameborder="0" allowfullscreen></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://www.blogswag.com/2012/03/22/dark-shadows-trailer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Java Design Techniques – Using Interfaces Part &#8211; 1</title>
		<link>http://www.blogswag.com/2012/03/17/java-design-techniques-using-interfaces-part-1/</link>
		<comments>http://www.blogswag.com/2012/03/17/java-design-techniques-using-interfaces-part-1/#comments</comments>
		<pubDate>Sat, 17 Mar 2012 13:01:02 +0000</pubDate>
		<dc:creator>vinod</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Design Pattern]]></category>
		<category><![CDATA[featured]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Java design Techniques]]></category>
		<category><![CDATA[Using Interfaces]]></category>

		<guid isPermaLink="false">http://www.blogswag.com/?p=365</guid>
		<description><![CDATA[Interfaces give you more polymorphism and design freedom than singly inherited families of classes, let us prove this statement. Consider an example of singly inherited families of classes. abstract class Animal { abstract void talk(); } class Dog extends Animal { void talk() { System.out.println("Woof!"); } } class Cat extends Animal { void talk() { [...]]]></description>
			<content:encoded><![CDATA[<p>Interfaces give you more polymorphism and design freedom than singly inherited families of classes, let us prove this statement.</p>
<p>Consider an example of singly inherited families of classes.</p>
<p><code><br />
abstract class Animal {<br />
abstract void talk();<br />
}</p>
<p>class Dog extends Animal {<br />
void talk() {<br />
System.out.println("Woof!");<br />
}<br />
}</p>
<p>class Cat extends Animal {<br />
void talk() {<br />
System.out.println("Meow.");<br />
}<br />
}</p>
<p>class Interrogator {<br />
static void makeItTalk(Animal subject) {<br />
subject.talk();<br />
}<br />
}<br />
</code><br />
Given these set of classes and inheritance, it becomes mandatory for you to pass only objects of the family Animal to the makeItTalk() function.</p>
<p>Remember a very good design never mandates you on any obvious scenario that might occur in future. As in case of the above example it does and hence it’s not a very good design to follow. This is where interfaces come and save you.</p>
<p>Using Interfaces make your design more flexible. Interfaces give you more polymorphism and design freedom than singly inherited families of classes, because with interfaces you don&#8217;t have to make everything fit into one family of classes.</p>
<p>For example:</p>
<p><code><br />
interface Talkative {</p>
<p>void talk();<br />
}</p>
<p>abstract class Animal implements Talkative {</p>
<p>abstract public void talk();<br />
}</p>
<p>class Dog extends Animal {</p>
<p>public void talk() {<br />
System.out.println("Woof!");<br />
}<br />
}</p>
<p>class Cat extends Animal {</p>
<p>public void talk() {<br />
System.out.println("Meow.");<br />
}<br />
}</p>
<p>class Interrogator {</p>
<p>static void makeItTalk(Talkative subject) {<br />
subject.talk();<br />
}<br />
}</p>
<p>Given this set of classes and interfaces, later you can add a new class to a completely different family of classes and still pass instances of the new class to makeItTalk(). For example, imagine you add a new CuckooClock class to an already existing Clock family:</p>
<p>class Clock {<br />
}</p>
<p>class CuckooClock implements Talkative {</p>
<p>public void talk() {<br />
System.out.println("Cuckoo, cuckoo!");<br />
}<br />
}</p>
<p>Because CuckooClock implements the Talkative interface, you can pass a CuckooClock object to the makeItTalk() method:</p>
<p>class Example {</p>
<p>public static void main(String[] args) {<br />
CuckooClock cc = new CuckooClock();<br />
Interrogator.makeItTalk(cc);<br />
}<br />
}<br />
</code></p>
<p>With single inheritance only, you&#8217;d either have to some how fit CuckooClock into the Animal family, or not use polymorphism. With interfaces, any class in any family can implement Talkative and be passed to makeItTalk(). This is why interfaces give you more polymorphism and design freedom than you can get with singly inherited families of classes.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blogswag.com/2012/03/17/java-design-techniques-using-interfaces-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to speed up your wordpress website</title>
		<link>http://www.blogswag.com/2012/03/12/how-to-speed-up-your-wordpress-website/</link>
		<comments>http://www.blogswag.com/2012/03/12/how-to-speed-up-your-wordpress-website/#comments</comments>
		<pubDate>Mon, 12 Mar 2012 17:24:26 +0000</pubDate>
		<dc:creator>indiaNPirates</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[cache]]></category>
		<category><![CDATA[featured]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.blogswag.com/?p=355</guid>
		<description><![CDATA[Everyone knows how popular wordpress is. WordPress is a free open-source content management system with very powerful build in tools. Many popular websites like ebay, wired, CNN, Yahoo, People&#8217;s group and hundreds more. It is famous because of its simplicity, as wordpress says &#8220;code is poetry&#8221; . Whats happen when your wordpress website becomes popular? [...]]]></description>
			<content:encoded><![CDATA[<p>Everyone knows how popular wordpress is. WordPress is a free open-source content management system with very powerful build in tools. Many popular websites like ebay, wired, CNN, Yahoo, People&#8217;s group and hundreds more. It is famous because of its simplicity, as wordpress says <strong>&#8220;code is poetry&#8221;</strong> .</p>
<p>Whats happen when your wordpress website becomes popular? obviously traffic to your website increases. this traffic will strain your server to such a extended that your site may be down and frequent blackouts. to deal with this situation lets have a look at few of the tweaks of wordpress blog so that minimum server resources are  used.</p>
<h2>Caching</h2>
<p>You can enable caching of your blog by inserting a small line of code given below into wp-config.php file</p>
<p><code>define(ENABLE_CACHE, true);</code></p>
<p>This will generate a static HTML page of the requested post or page when first visitor visits. Other users will be served with static page generated by first user. This will tremendously decrease queries exchanged between your PHP and MYSQL server. </p>
<p>You can also install plugin called super <a href="http://ocaoimh.ie/wp-super-cache/">WP-cache</a> and <a href="http://wordpress.org/extend/plugins/w3-total-cache/">W3 total cache</a>. These plugins will write they own MOD rules to serve static files more efficiently. These plugins also enables compression on images,css and Js files used in blog.</p>
<h2>Choose hosting account wisely</h2>
<p>They are many hosting companies which provide good platform to host wordpress website.We need to choose the hosting package very sensible keeping in mind how much your website will grow. Now a days this problem of exponential growth is taken care by  cloud based hosting accounts.</p>
<p>Ideal wordpress setting can be seen at <a href="http://wordpress.org/about/requirements/">http://wordpress.org/about/requirements</a></p>
<p>Choosing a correct host according to requirement means not just space, but also few other things listed below.</p>
<ul>
<li>Server softwares installed.</li>
<li>Bandwidth</li>
<li>number of processors and its make</li>
<li>Databases allowed</li>
<li>Domains allowed</li>
<li>Versions of PHP, MySQL, etc. are installed</li>
<li>Memory installed and % of CPU resource allowed to used</li>
</ul>
<p>server softwares represents web servers like Apache with NGINX as reverse proxy, Mem Cache as caching engine etc.</p>
<h2>Minimize use of plugins</h2>
<p>Don&#8217;t populate your wordpress blog with too many plugins as these plugins will eat up your server resources. You should remove plugins which are not used frequently. Also you should not use beta versions of plugins as those may still have bugs in it.Please keep on updating your plugins regulary.</p>
<h2>Please choose right theme</h2>
<p>Please choose a theme which is very light and don&#8217;t have too many graphics used in it. I would prefer to go with a CSS based design, avoid use of themes with tables and frames.If your theme uses too many images then your site&#8217;s loading time will get affected. remember that SEO also depends on websites speed. Try to used plane colors instead of graphics.</p>
<h2>Compress images, CSS, Javscript files</h2>
<p>Try to compress images,javascript and css files so that it increases the website speed. To add compression to css and js files via htaccess please look at the code given below</p>
<pre>&lt;ifModule mod_deflate.c&gt;
&lt;filesMatch &quot;\.(js|css)$&quot;&gt;
SetOutputFilter DEFLATE
&lt;/filesMatch&gt;
</pre>
<h2>Keep graphics local</h2>
<p>Try to keep your files local to your website so that time is not wasted looking for required resource from other website. Other website may be down when resource is requested at your website. they will be a latency added to requests on your website.</p>
<h2>Database optimization</h2>
<p>You have to repair and optimize database using tools like PhpMyAdmin. They are many plugins available which will do optimization automatically you can use them.</p>
<h2>Tune your wordpress settings</h2>
<p>You can tune wordpress blog in different ways. You can turn off cron jobs, Load minimum blog posts on first page or landing page of your website.You can view more settings in admin panel use them wisely else they will backfire. </p>
<p>Try to block pingbacks as they communicate with outer blogs for updates.</p>
<p><b>Hope this tips will somewhat speed up your wordpress website. These are very basic tips you can hope to get more advanced tips related to coding area in my coming articles. </b></p>
]]></content:encoded>
			<wfw:commentRss>http://www.blogswag.com/2012/03/12/how-to-speed-up-your-wordpress-website/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get RAM information in linux</title>
		<link>http://www.blogswag.com/2012/03/10/get-ram-information-in-linux/</link>
		<comments>http://www.blogswag.com/2012/03/10/get-ram-information-in-linux/#comments</comments>
		<pubDate>Sat, 10 Mar 2012 17:56:44 +0000</pubDate>
		<dc:creator>indiaNPirates</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Command]]></category>
		<category><![CDATA[featured]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[RAM]]></category>

		<guid isPermaLink="false">http://www.blogswag.com/?p=347</guid>
		<description><![CDATA[Ever wondered how to get Ram information in linux box, Linux provide a powerful command to get RAM information. It is a very simple command to use.You can also get RAM make information.Lets have a look at commands that can be used to get RAM information. Used and Free RAM Information [root@indianpirates ~]# free EXPECTED [...]]]></description>
			<content:encoded><![CDATA[<p>Ever wondered how to get Ram information in linux box, Linux provide a powerful command to get RAM information. It is a very simple command to use.You can also get RAM make information.Lets have a look at commands that can be used to get RAM information.</p>
<h2>Used and Free RAM Information</h2>
<p><code>[root@indianpirates ~]# free</code><br />
EXPECTED OUTPUT<br />
<code>[root@indianpirates ~]# free<br />
total used free shared buffers cached<br />
Mem: 1035324 501620 533704 0 28064 337400<br />
-/+ buffers/cache: 136156 899168<br />
Swap: 2040212 0 2040212<br />
</code></p>
<p>We can get information in more appropriate way in MB using command given below</p>
<p><code>[root@indianpirates ~]# free -m</code><br />
EXPECTED OUTPUT<br />
<code>[root@indianpirates ~]# free -m<br />
total used free shared buffers cached<br />
Mem: 1011 489 521 0 27 329<br />
-/+ buffers/cache: 132 878<br />
Swap: 1992 0 1992<br />
</code></p>
<p>Lets move on to more advance command which will show make,speed and other information.</p>
<p><code>dmidecode --type memory</code><br />
EXPECTED OUTPUT<br />
<code>[root@indianpirates ~]# dmidecode --type memory<br />
# dmidecode 2.7<br />
SMBIOS 2.4 present.</p>
<p>Handle 0x003B, DMI type 17, 27 bytes.<br />
Memory Device<br />
Array Handle: 0x003A<br />
Error Information Handle: No Error<br />
Total Width: 32 bits<br />
Data Width: 32 bits<br />
Size: 1024 MB<br />
Form Factor: DIMM<br />
Set: None<br />
Locator: RAM slot #0<br />
Bank Locator: RAM slot #0<br />
Type: DRAM<br />
Type Detail: EDO<br />
Speed: Unknown<br />
Manufacturer: Not Specified<br />
Serial Number: Not Specified<br />
Asset Tag: Not Specified<br />
Part Number: Not Specified</p>
<p>Handle 0x003C, DMI type 17, 27 bytes.<br />
</code></p>
<p>If you want to get it in graphical visual please try command given below</p>
<p><code>[root@indianpirates ~]# gnome-system-monitor</code></p>
<p><strong>Isn&#8217;t it simple ? this is the power of linux.</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.blogswag.com/2012/03/10/get-ram-information-in-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cat command in linux and unix</title>
		<link>http://www.blogswag.com/2012/03/09/cat-command-in-linux-and-unix/</link>
		<comments>http://www.blogswag.com/2012/03/09/cat-command-in-linux-and-unix/#comments</comments>
		<pubDate>Fri, 09 Mar 2012 17:18:50 +0000</pubDate>
		<dc:creator>indiaNPirates</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[cat]]></category>
		<category><![CDATA[commands]]></category>
		<category><![CDATA[featured]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://www.blogswag.com/?p=332</guid>
		<description><![CDATA[Cat command is a very popular command in linux/unix. it used very frequently for creating files and displaying files on screen.lets have a look at few of the examples for cat command in linux with its expected output. To view file [root@indianpirates perl]# cat forlast.pl #! /usr/bin/perl5 # use of last to break the loop use [...]]]></description>
			<content:encoded><![CDATA[<p>Cat command is a very popular command in linux/unix. it used very frequently for creating files and displaying files on screen.lets have a look at few of the examples for cat command in linux with its expected output.</p>
<h3>To view file</h3>
<pre>
[root@indianpirates perl]# cat forlast.pl
#! /usr/bin/perl5
# use of last to break the loop

use warnings;
use strict;

my @array = (&quot;Blue&quot;,&quot;Red&quot;,&quot;Green&quot;,&quot;Stop&quot;,&quot;King&quot;);
for my $i (@array){
  last if $i eq &quot;Stop&quot;;
  print &quot;Todays colour is $i\n&quot;;
}
</pre>
<p>In above example, We have given a command to display perl file called &#8220;forlast.pl&#8221;, so basic command is &#8220;cat [filename]&#8221;</p>
<h3>To create a file</h3>
<pre>
[root@indianpirates perl]# cat &gt; file.txt
this is test content for file creation using cat command
&lt;press ctrl+d&gt;
</pre>
<p>To view the saved content give command as &#8220;cat file.txt&#8221; you can see the content you have saved in file.isn&#8217;t it simple <img src='http://www.blogswag.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<h3>Displaying large files using cat</h3>
<p>You can display large files who output normally scrolls fast to bottom to show prompt. To view all the text we have 2 commands listed below.</p>
<p><code><br />
cat filename | more<br />
cat filename | less<br />
</code></p>
<h3>Joining 2 or more files</h3>
<p><code><br />
cat file1 file2 > newfile<br />
cat newfile<br />
</code></p>
<p>newfile will contain content of both file1 and file2.</p>
<h3>Appending a file</h3>
<p><code>cat >> filename</code></p>
<p><strong>OUTPUT:</strong></p>
<pre>
[root@indianpirates perl]# cat &gt;&gt; file.txt
appendend content

[root@indianpirates perl]# cat file.txt
this is test content appendend content
</pre>
<h3>View cat output with numbered lines</h3>
<p>You can view the cat output with line numbering.This can be done with command listed below.</p>
<p><code>cat -n filename</code></p>
<p><strong>OUTPUT:</strong></p>
<pre>
[root@indianpirates perl]# cat -n file.txt
     1  this is test content appendend content
[root@indianpirates perl]#
</pre>
<h3>Print files using cat</h3>
<p>You can print a file with cat command using below syntax.</p>
<p><code>cat file.txt | lpr</code><br />
<strong>OR</strong><br />
<code>cat file.txt > /dev/lp</code></p>
<h3>Joining binary files</h3>
<p>You can join binary files to create a single gz file to compress them.lets have a look at syntax of how we can do that.</p>
<p><code><br />
   cat file1.bin file2.bin file3.bin > file.tar.gz<br />
   # to unzip the created file.<br />
   tar -zxvf file.tar.gz<br />
</code></p>
<p><b>They are many more commands which are used with cat, I have listed few of the popular usage of cat command. Hope you enjoyed it reading and learned how powerful is linux with these type of simple to use commands.</b></p>
]]></content:encoded>
			<wfw:commentRss>http://www.blogswag.com/2012/03/09/cat-command-in-linux-and-unix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Understanding PHP Security – Part 3</title>
		<link>http://www.blogswag.com/2012/03/08/understanding-php-security-part-3/</link>
		<comments>http://www.blogswag.com/2012/03/08/understanding-php-security-part-3/#comments</comments>
		<pubDate>Thu, 08 Mar 2012 17:32:15 +0000</pubDate>
		<dc:creator>indiaNPirates</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[featured]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://www.blogswag.com/?p=313</guid>
		<description><![CDATA[Welcome to final part of understanding PHP Security, till now we have checked out types of attacks and few of the configuration settings which will harden your PHP powered web server.lets checkout more configurations and few open source tools which will assist in maintaining a secure server. PHP User and Group ID mod_fastcgi is a [...]]]></description>
			<content:encoded><![CDATA[<p>Welcome to final part of understanding PHP Security, till now we have checked out types of attacks and few of the configuration settings which will harden your PHP powered web server.lets checkout more configurations and few open source tools which will assist in maintaining a secure server.</p>
<p><strong>PHP User and Group ID</strong><br />
mod_fastcgi is a cgi-module for Apache web server. It can connect to an external FASTCGI server. You need to make sure php run as non-root user. If PHP executes as a root or UID under 100, it may access and/or manipulate system files. You must execute PHP CGIs as a non-privileged user using Apache&#8217;s suEXEC or mod_suPHP. The suEXEC feature provides Apache users the ability to run CGI programs under user IDs different from the user ID of the calling web server. In this example, my php-cgi is running as phpcgi user and apache is running as apache user:</p>
<p><code># ps aux | grep php-cgi</code></p>
<p>Output expected:</p>
<p><code><br />
phpcgi 6012 0.0 0.4 225036 60140 ? S Nov22 0:12 /usr/bin/php-cgi<br />
phpcgi 6054 0.0 0.5 229928 62820 ? S Nov22 0:11 /usr/bin/php-cgi<br />
phpcgi 6055 0.1 0.4 224944 53260 ? S Nov22 0:18 /usr/bin/php-cgi<br />
</code></p>
<p><strong>Session Path</strong><br />
Sessions in PHP consists of a way to preserve certain data across subsequent accesses. This enables you to build more customized applications and increase the appeal of your web site. This path is defined in /etc/php.ini file and all data related to a particular session will be stored in a file in the directory specified by the session.save_path option. The default is as follows under RHEL/CentOS/Fedora Linux:</p>
<p><code><br />
session.save_path="/var/lib/php/session"<br />
upload_tmp_dir="/var/lib/php/session"<br />
</code></p>
<p>Make sure path is outside /var/www/html and not readable or writeable by any other system users:</p>
<p><code># ls -Z /var/lib/php/</code></p>
<p>OUTPUT:</p>
<p><code>drwxrwx---. root apache system_u:object_r:httpd_var_run_t:s0 session</code></p>
<p><strong>Keep PHP, Software, And OS Up to Date</strong><br />
Applying security patches is an important part of maintaining Linux, Apache, PHP, and MySQL server. All php security update should be reviewed and applied as soon as possible using any one of the following tool (if you&#8217;re installing PHP via a package manager):</p>
<p><code><br />
# YUM update<br />
OR<br />
# apt-get update &amp;&amp; apt-get upgrade<br />
</code></p>
<p><strong>Use Linux Security Extensions (such as SELinux)</strong><br />
Linux comes with various security patches which can be used to guard against misconfigured or compromised server programs. If possible use SELinux and other Linux security extensions to enforce limitations on network and other programs. For example, SELinux provides a variety of security policies for Linux kernel and Apache web server. To list all Apache SELinux protection variables, enter:</p>
<p><code>getsebool -a | grep httpd</code></p>
<p>Output:</p>
<p><code><br />
httpd_builtin_scripting --&gt; on<br />
httpd_can_check_spam --&gt; off<br />
httpd_can_network_connect --&gt; off<br />
httpd_can_network_connect_cobbler --&gt; off<br />
httpd_can_network_connect_db --&gt; off<br />
</code></p>
<p><strong>Install Mod_security</strong><br />
ModSecurity is an open source intrusion detection and prevention engine for web applications. You can easily install mod_security under Linux and protect apache and php based apps from xss and various other attacks:</p>
<p><code><br />
## A few Examples ##<br />
# Do not allow to open files in /etc/<br />
SecFilter /etc/</code></p>
<p># Stop SQL injection<br />
SecFilter &#8220;delete[[:space:]]+from&#8221;<br />
SecFilter &#8220;select.+from&#8221;</p>
<p><strong>Use Firewall To Restrict Outgoing Connections</strong><br />
The attacker will download file locally on your web-server using tools such as wget. Use iptables to block outgoing connections from apache user. The ipt_owner module attempts to match various characteristics of the packet creator, for locally generated packets. It is only valid in the OUTPUT chain. In this example, allow indianpirates user to connect outside using port 80 (useful for RHN or centos repo access):</p>
<p><code><br />
/sbin/iptables -A OUTPUT -o eth0 -m owner --uid-owner indiapirates -p tcp --dport 80 -m state --state NEW,ESTABLISHED -j ACCEPT<br />
</code></p>
<p><strong>Logs</strong><br />
You should regularly check log files of the server for any unusual behaviour</p>
<p><code><br />
# tail -f /var/log/httpd/error_log<br />
# grep 'login.php' /var/log/httpd/error_log<br />
# egrep -i "denied|error|warn" /var/log/httpd/error_log<br />
</code></p>
<p>Log files will give you some understanding of what attacks is thrown against the server and allow you to check if the necessary level of security is present or not. The auditd service is provided for system auditing. Turn it on to audit SELinux events, authetication events, file modifications, account modification and so on.</p>
<p><strong>Run each service as a server or VM instance</strong><br />
if you are running a big portal, you must run each service as a server so that whole portal don&#8217;t come down.Example listed below will show you what i meant to say.</p>
<p>Prepare a VM instance for file serving. files like javascripts,css,images can be stored in file server.<br />
in a same way prepare a database server so that if database is down your entire service will not be down.</p>
<p>in the same way you can separate phpcgi engine, memcache server also you can install nginx reverse proxy on another server.</p>
<p><strong>Some of the tools</strong><br />
you can use some of the tools which are available to check if your system is secure or not and give suggestions how we can improve our security.<br />
<strong>1) PHP-Intrusion Detection System</strong><br />
<strong>2) PhpSecInfo</strong><br />
<strong><br />
I conclude my views on PHP security hope these series of tutorial will help you in keeping your system UP and Running without any problems.if you feel that i have gone wrong somewhere or you have any doubts please comment it and we will try to solve your problem. Thanks for reading our article.</strong></p>
<p>Previous parts<br />
<a href="http://www.blogswag.com/2012/03/07/understanding-php-security-part-1/">http://www.blogswag.com/2012/03/07/understanding-php-security-part-1/</a><br />
<a href="http://www.blogswag.com/2012/03/07/understanding-php-security-part-2/">http://www.blogswag.com/2012/03/07/understanding-php-security-part-2/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.blogswag.com/2012/03/08/understanding-php-security-part-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Understanding PHP Security – Part 2</title>
		<link>http://www.blogswag.com/2012/03/07/understanding-php-security-part-2/</link>
		<comments>http://www.blogswag.com/2012/03/07/understanding-php-security-part-2/#comments</comments>
		<pubDate>Wed, 07 Mar 2012 18:13:37 +0000</pubDate>
		<dc:creator>indiaNPirates</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[featured]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://www.blogswag.com/?p=303</guid>
		<description><![CDATA[In last tutorials we had a look at some of the tips and different type of attacks your site would counter.continuing our series of tutorial on php security lets have a look at more tips. Log all PHP errors Errors should not be displayed to the site users. You can change security settings at  /etc/php.d/security.ini [...]]]></description>
			<content:encoded><![CDATA[<p>In last tutorials we had a look at some of the tips and different type of attacks your site would counter.continuing our series of tutorial on php security lets have a look at more tips.</p>
<p><strong>Log all PHP errors</strong><br />
Errors should not be displayed to the site users. You can change security settings at  /etc/php.d/security.ini and set the following directive:</p>
<p><code>display_errors=Off</code><br />
Also make sure that errors are log to a file which will be used by you to track the errors. You should check this file regularly to get an idea of how your website is functioning.</p>
<p><code>log_errors=On<br />
error_log=/var/log/httpd/php_scripts_error.log</code></p>
<p><strong>Disable uploading of files to server</strong><br />
Uploading of files to server should be disabled.It is better to have a separate file server defined so that your web services are not affected by any virus or bandwidth problem.<br />
Edit /etc/php.d/security.ini and set the following directive to disable file uploads for security reasons:</p>
<p><code>file_uploads=Off</code></p>
<p>You can also set user to upload only allowed file sizes.You can define it as given below</p>
<p><code>upload_max_filesize=1M</code></p>
<p><strong>Disable Remote Code Execution </strong><br />
If enabled, <strong>allow_url_fopen</strong> allows PHP&#8217;s file functions such as <strong>file_get_contents()</strong> and the include and require statements can retrieve data from remote locations, like an FTP or web site which is a very risky thing.</p>
<p>Programmers frequently forget this and don&#8217;t do proper input filtering when passing user-provided data to these functions, opening them up to code injection vulnerabilities. A large number of code injection vulnerabilities reported in PHP-based web applications are caused by the combination of enabling allow_url_fopen and bad input filtering. Edit /etc/php.d/security.ini and set the following directive:</p>
<p><code>allow_url_fopen=Off</code></p>
<p>I also recommend to disable <strong>allow_url_include</strong> for security reasons:</p>
<p><code>allow_url_include=Off</code></p>
<p><strong>Enable SQL safe mode</strong><br />
Edit /etc/php.d/security.ini and set the following values:</p>
<p><code>sql.safe_mode=On</code></p>
<p>If turned On, <strong>mysql_connect()</strong> and <strong>mysql_pconnect()</strong> ignore any arguments passed to them. Third party and open source application such as WordPress, and others may not work at all when sql.safe_mode enabled. I also recommend that you turn off magic_quotes_gpc for all php 5.3.x installations as the filtering is ineffective and not very robust. <strong>mysql_escape_string()</strong> and custom filtering functions serve a better purpose.</p>
<p><code>magic_quotes_gpc=Off</code></p>
<p><strong>Set Post max size</strong><br />
POST request method for form to send data to any web server. Attackers may attempt to send oversized POST requests to eat your system resources. You can limit the maximum size POST request that PHP will process. Edit /etc/php.d/security.ini and set the following directive:</p>
<p><code>post_max_size=1K</code></p>
<p>The 1K sets max size of post data allowed by php apps. This setting also affects file upload. To upload large files, this value must be larger than upload_max_filesize. I also suggest that you limit available methods using Apache web server. Edit, httpd.conf and set the following directive for DocumentRoot /var/www/html:</p>
<pre class="ini">&lt;Directory /var/www/html&gt;
    &lt;LimitExcept GET POST&gt;
        Order allow,deny
    &lt;/LimitExcept&gt;
&lt;/Directory&gt;</pre>
<p><strong>Solving Denial of service attack (DOS)</strong><br />
You can set maximum execution time of each php script, in seconds. Another recommended option is to set maximum amount of time each script may spend parsing requested data, and maximum amount of memory a script may consume. Edit /etc/php.d/security.ini and set the following directives:</p>
<p><code><br />
* all values are in seconds<br />
max_execution_time = 30<br />
max_input_time = 30<br />
memory_limit = 40M<br />
</code></p>
<p><strong>Disabling system PHP Functions</strong><br />
PHP has a lot of functions which can be used to crack your server if not used properly. You can set list of functions in /etc/php.d/security.ini using disable_functions directive:</p>
<p><code>disable_functions =exec,passthru,shell_exec,system,proc_open,popen,curl_exec,curl_multi_exec</code></p>
<p>You can disable many more function i have given few of the examples.</p>
<p><strong>Limit PHP Access To File System</strong><br />
The open_basedir directive set the directories from which PHP is allowed to access files using functions like fopen(), and others. If a file is outside of the paths defined by open_basdir, PHP will refuse to open it. You cannot use a symbolic link as a workaround. For example only allow access to /var/www/html directory and not to /var/www, or /tmp or /etc directories:</p>
<p><code>open_basedir="/var/www/html/"</code></p>
<p><strong>Restrict File and Directory Access</strong><br />
This point is a very important point. We MUST configure apache user as a non-root user.All files and directory should be owned by non-root user (or apache user) under /var/www/html. This prevents any hack into core of the system.</p>
<p><code>chown -R apache:apache /var/www/html/</code></p>
<p><strong>Write Protect Apache, PHP, and, MySQL Configuration Files</strong><br />
Always set configuration files of Apache,PHP and Mysql are readonly to avoid unauthorized modifications.You can do it using Use the chattr command to write protect configuration files:</p>
<p><code><br />
# chattr +i /etc/php.ini<br />
# chattr +i /etc/php.d/*<br />
# chattr +i /etc/my.ini<br />
# chattr +i /etc/httpd/conf/httpd.conf<br />
# chattr +i /etc/<br />
</code></p>
<p><strong>We will learn more PHP Security lessons in my next part.</strong><br />
Check out the first part at <a href="http://www.blogswag.com/2012/03/07/understanding-php-security-part-1/">http://www.blogswag.com/2012/03/07/understanding-php-security-part-1/</a></p>
<p>Cheers</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blogswag.com/2012/03/07/understanding-php-security-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 0.309 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2012-04-27 00:53:29 -->
<!-- Compression = gzip -->
