<?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>RubyFreaks</title>
	<atom:link href="http://rubyfreaks.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://rubyfreaks.com</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Thu, 13 May 2010 16:42:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>rsync-</title>
		<link>http://rubyfreaks.com/2010/05/13/rsync/</link>
		<comments>http://rubyfreaks.com/2010/05/13/rsync/#comments</comments>
		<pubDate>Thu, 13 May 2010 16:34:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://rubyfreaks.com/?p=145</guid>
		<description><![CDATA[rsync is an open source utility that provides fast incremental file transfer. rsync is freely available under the GNU General Public License and is currently being maintained by Wayne Davison. The command for automatic backup #On the rsync server [192.168.1.29]. touch /var/log/rsyncd.log #Add the following lines to /etc/rsyncd.conf file. motd file = /home/rsync/welcome.msg log file [...]]]></description>
			<content:encoded><![CDATA[<p>rsync is an open source utility that provides fast incremental file transfer. rsync is freely available under the GNU General Public License and is currently being maintained by Wayne Davison. </p>
<p>The command for automatic backup</p>
<p>#On the rsync server [192.168.1.29].<br />
<strong>touch /var/log/rsyncd.log</strong></p>
<p>#Add the following lines to /etc/rsyncd.conf file.<br />
<strong>motd file = /home/rsync/welcome.msg<br />
log file = /var/log/rsyncd.log<br />
use chroot = yes<br />
[server_bkp]<br />
path = /var/www/html<br />
comment = Default rsync module<br />
read only = yes<br />
list = yes<br />
uid = root<br />
gid = root<br />
max connections = 20</strong> </p>
<p>#Allowable client machines. Comma separated list.<br />
<strong>hosts allow = 192.168.1.70</strong></p>
<p>#Now restart the rsync daemon.<br />
<strong>rsync &#8211;daemon</strong></p>
<p>#On the client side [192.168.1.70].<br />
<strong>mkdir /backup/html</strong></p>
<p>#Set crontab for the backup.<br />
<strong>crontab -e<br />
#30 11 * * * /usr/bin/rsync -aqz 192.168.1.29::server_bkp /backup/html<br />
</strong></p>
<p>For more information please visit <a href="http://rsync.samba.org">http://rsync.samba.org</a></p>
]]></content:encoded>
			<wfw:commentRss>http://rubyfreaks.com/2010/05/13/rsync/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Cloud Computing-What Cloud Means?The Advantages</title>
		<link>http://rubyfreaks.com/2010/02/19/cloud-computing-what-cloud-meansthe-advantages/</link>
		<comments>http://rubyfreaks.com/2010/02/19/cloud-computing-what-cloud-meansthe-advantages/#comments</comments>
		<pubDate>Sat, 20 Feb 2010 04:00:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Cloud Comuting]]></category>
		<category><![CDATA[Cloud Computing]]></category>

		<guid isPermaLink="false">http://rubyfreaks.com/?p=140</guid>
		<description><![CDATA[The buzz is the computing world is about getting on to the clouds. Cloud computing is a general term for anything that involves delivering hosted services over the Internet. These services are broadly divided into three categories: Infrastructure-as-a-Service (IaaS), Platform-as-a-Service (PaaS) and Software-as-a-Service (SaaS).The vague concept has been around for decades, and it is still [...]]]></description>
			<content:encoded><![CDATA[<p>The buzz is the computing world is about getting on to the clouds. Cloud computing is a general term for anything that involves delivering hosted services over the Internet. These services are broadly divided into three categories: Infrastructure-as-a-Service (IaaS), Platform-as-a-Service (PaaS) and Software-as-a-Service (SaaS).The vague concept has been around for decades, and it is still a doozy.<br />
 A &#8220;Cloud&#8221; is a bag of stuff that is out there, in no particular place, but you can reach into it whenever you need it, or as they say &#8220;on demand&#8221;.  You can apply this to servers, to apps &#8211; features and capabilities &#8211; to team members that are there when you need them.  A cloud resource should be globally accessible, and hosted, so you don&#8217;t have to worry about how to get to it or maintain it.  The idea that we can rub our laptop and summon out of the smoke a powerful genie, a huge bag of resources, is emotionally intense.  That&#8217;s why &#8220;Cloud&#8221; is such a great marketing term.</p>
<p><strong>What you need?</strong></p>
<p>Computing devices with enough processing power to get online forget about the storage space and application.</p>
<p><strong>The advantage</strong></p>
<p>The cloud brings down the cost of a continuously available computing instance by 30%.</p>
<p>For those planning their cloud usage, you can use<a href="http://calculator.s3.amazonaws.com/calc5.html"> Amazon&#8217;s handy cloud services calculator</a> to run your own scenarios.</p>
]]></content:encoded>
			<wfw:commentRss>http://rubyfreaks.com/2010/02/19/cloud-computing-what-cloud-meansthe-advantages/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Internationalization(I18n) and Localization(L10n) in Rails</title>
		<link>http://rubyfreaks.com/2009/09/29/internationalizationi18n-and-localizationl10n-in-rails/</link>
		<comments>http://rubyfreaks.com/2009/09/29/internationalizationi18n-and-localizationl10n-in-rails/#comments</comments>
		<pubDate>Tue, 29 Sep 2009 11:49:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[RUBY]]></category>
		<category><![CDATA[ruby on rails]]></category>

		<guid isPermaLink="false">http://rubyfreaks.com/?p=126</guid>
		<description><![CDATA[Internationalization is the process of designing a software application so that it can be adapted to various languages and regions without engineering changes. Localization is the process of adapting internationalized software for a specific region or language by adding locale-specific components and translating text. Due to the length of the words, the terms are frequently [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Internationalization</strong> is the process of designing a software application so that it can be adapted to various languages and regions without engineering changes. <strong>Localization</strong> is the process of adapting internationalized software for a specific region or language by adding locale-specific components and translating text.</p>
<p>Due to the length of the words, the terms are frequently abbreviated to the numeronyms i18n (where 18 stands for the number of letters between the first i and last n in internationalization, a usage coined at DEC in the 1970s or 80s[1]) and L10n respectively. The capital L in L10n helps to distinguish it from the lowercase i in i18n.</p>
<div id="wiki-content">
<p><strong>Internationalization and localization instructions</strong></p>
<p id="3c7374726f6e673e6261736963207465726d733c2f7374726f6e673e203c6272202f3e"><strong>Basic Terms</strong> <br/></p>
<p><strong>pot-file:</strong> Text file automatically generated with rake task (rake updatepo) or rgettext that shows all the original messages (msgid) inside the app code. Developers should generate this files and send them to translators as a template to write the po files (translated version of the pot file for a language).</p>
<p><strong>po-file:</strong> Text file which is language-specific. It includes msgid(Original message) and msgstr(Translated message)</p>
<p><strong>mo-file:</strong> Binary Files which are created from po-files with rake task (rake makemo) or rmsgfmt. The <a href="http://http://www.yotabanana.com/hiki/ruby-gettext.html">Ruby-GetText</a>-Package library reads this compiled mo-files, not po-files.</p>
</p>
<p id="66696c65206d61696e74656e616e6365266e6273703b">File Maintenance </p>
<p>To do I18n maintenance, you need to install ruby-gettext-package</p>
<p>As it is not in the gem repository, you need to:<br/>1) Download ruby-gettext-package- from <a href="http://rubyforge.org/frs/?group_id=855&#038;release_id=34790">here</a><br/>2) Extract ruby-gettext-package-<br/>3) Go to the extracted directory and run &#8220;sudo ruby setup.rb&#8221;</p>
<p><strong>How to add a new language?:</strong></p>
<p>1) create language directory inside &#8220;po&#8221; folder (eg: es/)<br/> 2) Go inside new language folder and run: msginit -i ../ur_application_name.pot -o ur_application_name.po</p>
</p>
<p><strong> How to update po files (when new keys are added or modified)?:</strong><br/> 1) Go to app folder and run: rake updatepo</p>
</p>
<p><strong>To recompile files (when you get new/modifed po files translated)</strong><br/> 1) Go to app folder and run: rake makemo</p>
</p>
<p id="266e6273703b686f7720746f20616464266e6273703b206931386e20746f206120706167653f3c6272202f3e"> How to add  i18n to a Page?</p>
<p><br/></p>
<p><strong>Basics</strong></p>
<p>If you want to translate a text. Eg. &#8220;This text&#8221;  You need to simple call _(). E.g _(&#8220;This text&#8221;). </p>
<p>The key will be added to the po file and someone will translate it later. If the key is already in the po file (and compiled in the mo file) it will appear translated. You should choose keys that make sense and that might be reusable. Try not to pick very long  texts as keys.</p>
<ul>
<li>If you need to include arguments to your strings, check: <a href="http://www.yotabanana.com/hiki/ruby-gettext-howto.html#String+with+arguments">http://www.yotabanana.com/hiki/ruby-gettext-howto.html#String+with+arguments </a> </li>
<li>If you need to use plural forms (eg. &#8220;you have 1 new message&#8221;), check:  <a href="http://www.yotabanana.com/hiki/ruby-gettext-howto.html#How+to+use+GetText.n_(msgid%2C+msgid_plural%2C+n)">http://www.yotabanana.com/hiki/ruby-gettext-howto.html#How+to+use+GetText.n_(msgid%2C+msgid_plural%2C+n)</a> </li>
<li>If you need to define constants in the po file, use N_() (eg, attribute accesors in model) you can use N_(&#8220;Password&#8221;). This functions does nothing but allows you to include the key in the po file.</li>
<li>If you need to include a context specific key <em>(eg: &#8220;File|Open&#8221;, &#8220;Printer|Open&#8221;),</em> check s_() function: <a href="http://www.yotabanana.com/hiki/ruby-gettext-howto.html#How+to+use+GetText.s_(msgid%2C+div+%3D+%22|%22)">http://www.yotabanana.com/hiki/ruby-gettext-howto.html#How+to+use+GetText.s_(msgid%2C+div+%3D+%22|%22)</a> </li>
</ul>
<p> <strong>Model: </strong>All field names are automatically added to the po file from the database (whith the rake task). If you need to define constants or translate new error messages, you can use the N_() function. For more information, check: <a href="http://www.yotabanana.com/hiki/ruby-gettext-howto-rails.html">http://www.yotabanana.com/hiki/ruby-gettext-howto-rails.html</a></p>
</p>
</p></div>
]]></content:encoded>
			<wfw:commentRss>http://rubyfreaks.com/2009/09/29/internationalizationi18n-and-localizationl10n-in-rails/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>Git- Fast Version Control System</title>
		<link>http://rubyfreaks.com/2009/09/24/git/</link>
		<comments>http://rubyfreaks.com/2009/09/24/git/#comments</comments>
		<pubDate>Thu, 24 Sep 2009 12:36:15 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[GIT]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Version Control]]></category>

		<guid isPermaLink="false">http://rubyfreaks.com/?p=117</guid>
		<description><![CDATA[  GIT     What is Git?     Git is a free &#038; open source, distributed version control system designed to handle everything from small to very large projects with speed and efficiency. Git was initially designed and developed by Linus Torvalds for Linux kernel development. To install Git on Debian/Ubuntu based Linux distribution use apt-get [...]]]></description>
			<content:encoded><![CDATA[<p><strong>  GIT</strong><br />
   <br />
<strong>What is Git?</strong><br />
    Git is a free &#038; open source, distributed version control system designed to handle everything from small to very large projects with speed and efficiency. Git was initially designed and developed by<a href="http://torvalds-family.blogspot.com/"> Linus Torvalds</a> for Linux kernel development.<br />
To install Git on <a href="http://www.debian.org/">Debian</a>/<a href="http://www.ubuntu.com/">Ubuntu</a> based Linux distribution use </p>
<pre> <strong>apt-get install git-core</strong> </pre>
<p>      </p>
<p>Run once to create your local work branch </p>
<pre><strong>git checkout -b <your branch name></strong> </pre>
<p>Then make changes and commit to local branch.</p>
<p>Commit good practices:</p>
<ul>
<li> If you commit with git-gui, please inspect diff of every file included in the commit. You should not modify or delete any files that are not part of logic changes related to a task.  <br/> If you do not have a gui program to commit, inspect diff from command line: git-status &#8211; check files that need to be added/removed and git-diff to inspect changed files. </li>
<li>Enter a good description for commit: first line should be a  summary up to 80 chars, other lines can contain more descriptive message, if commit is related to a ticket use re #ticket_number to automatically add a comment to the ticket with commit description. </li>
</ul>
<p>To push to repository:</p>
<pre><strong>rake git:push</strong></pre>
<p>this command will update code from remote repository and will rebase your work branch with master, merge master branch  and it will push your changes to remote server.</p>
<p>To update the code from central repository</p>
<pre><strong>rake git:update</strong></pre>
<pre><strong>git checkout master<br/>git checkout -b <ur branch name></strong> </pre>
<p>commit your changes and after push this branch to remote </p>
<pre><strong>git push origin <ur branch name></strong> </pre>
<ul>
<li>You want to copy one commit from other branch to current branch
<pre><strong>git checkout current_branch<br/>git cherry-pick sha_id_from_other_branch</strong><br/></pre>
<p>Using gitk: 
<ol>
<li> right click on current branch and click check out this branch from popup menu </li>
<li> click on commit from other branch, right-click and select Cherry-pick this commit </li>
</ol>
</li>
<li>You forget to add some files to previous commit:
<pre><strong>git reset --soft HEAD^<br/># do some changes, add files that you forget<br/>git commit -c ORIG_HEAD</strong><br/></pre>
<p>Using git-gui:
<ol>
<li>Click Amend radio button above text area for commit description </li>
<li>Add/remove files from commit </li>
<li>Commit new changes </li>
</ol>
</li>
</ul>
<p>    </p></div>
<p>You can find more information regarding the Git <a href="http://git-scm.com/">here</a>.<br />
You can also find some useful miscellaneous git tools <a href="http://git-wt-commit.rubyforge.org/">here</a></p>
<style type="text/css">
pre {
-moz-background-clip:border;
-moz-background-inline-policy:continuous;
-moz-background-origin:padding;
background:#BE1115  none repeat scroll 0 0;
font-size:11px;
color:#FFFFFF;
overflow:auto;
}</p>
</style>
]]></content:encoded>
			<wfw:commentRss>http://rubyfreaks.com/2009/09/24/git/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>15 Useful Linux Media Related Commands</title>
		<link>http://rubyfreaks.com/2009/07/13/15-useful-linux-media-related-commands/</link>
		<comments>http://rubyfreaks.com/2009/07/13/15-useful-linux-media-related-commands/#comments</comments>
		<pubDate>Tue, 14 Jul 2009 05:27:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://rubyfreaks.com/?p=99</guid>
		<description><![CDATA[1 Command to burn a dvd image to DVD. growisofs -dvd-compat -Z /dev/dvd=/root/fedora.iso 2 Command to burn a cd image to CD. cdrecord -v speed=20 dev=/dev/scd0 /root/pfSense-1.2-RC3-LiveCD-Installer.iso 3 Command to make DVD image. dd if=/dev/scd0 of=/root/Desktop/fedora.iso cd /root/fc10 4 To make bootable iso of a directory. mkisofs -J -R -o /opt/fc10.iso -b isolinux/isolinux.bin -c isolinux/boot.cat [...]]]></description>
			<content:encoded><![CDATA[<p>1 Command to burn a dvd image to DVD.<br />
<strong>growisofs -dvd-compat -Z /dev/dvd=/root/fedora.iso</strong></p>
<p>2 Command to burn a cd image to CD.<br />
<strong>cdrecord -v speed=20 dev=/dev/scd0 /root/pfSense-1.2-RC3-LiveCD-Installer.iso<br />
</strong></p>
<p>3 Command to make DVD image.<br />
<strong>dd if=/dev/scd0 of=/root/Desktop/fedora.iso<br />
cd /root/fc10</strong></p>
<p>4 To make bootable iso of a directory.<br />
<strong>mkisofs -J -R -o /opt/fc10.iso -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table /root/fc10</strong></p>
<p>5 To make iso of a directory.<br />
<strong>mkisofs -r -o /tmp/var-www-disk1.iso /var/www</strong></p>
<p>6 To make a data dvd.<br />
<strong>growisofs -Z /dev/scd0 -R -J /home/happyuser<br />
growisofs -Z /dev/dvd -R -J /some/files</strong></p>
<p>7 Converting avi to DVD and burning the DVD.<br />
<strong>mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=dvd -vf scale=720:576,harddup -srate 48000 -af lavcresample=48000 -lavcopts vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=5000:keyint=15:aspect=16/9:acodec=ac3:abitrate=192 -ofps 25 -o your_video.mpg your_video.avi<br />
dvdauthor -o Memento -x dvd.xml<br />
mplayer dvd:// -dvd-device ./Memento/<br />
growisofs -dvd-compat -Z /dev/dvdrw -dvd-video ./Memento/</strong></p>
<p>8 To format DVD-RW<br />
<strong>dvd+rw-format -force /dev/dvd</strong></p>
<p>9 To create ISO images of directories on your hard drive.<br />
<strong>mkisofs -o Directory.iso Directory</strong></p>
<p>10 To format CD-RW<br />
<strong>cdrecord blank=fast dev=1,0,0</strong></p>
<p>11 To create an empty disk image, to be used as the disk for an emulator for example, one can get data from /dev/zero. To create a 10mb image:<br />
<strong>dd if=/dev/zero of=myimage bs=1024 count=10240</strong></p>
<p>12 To merge more than one avi files.<br />
<strong>avimerge -o filename.avi -i first_file.avi second_file.avi</strong></p>
<p>13 To convert avi to mpeg-2<br />
<strong>mencoder /root/ItalianJob.avi -mf fps=1 -o /opt/ItalianJob.mpg -ovc lavc -oac pcm -lavcopts vcodec=mpeg2video</strong></p>
<p>14 To convert mpg to avi.<br />
<strong>mencoder /editor/Seval.mpg -ovc xvid -oac mp3lame -xvidencopts bitrate=800 -o /opt/Seval.avi<br />
</strong></p>
<p>15 To convert all jpeg files in the current directory to avi.<br />
<strong>mencoder &#8220;mf://*.jpg&#8221; -mf fps=1 -o outputs.avi -ovc lavc -lavcopts vcodec=mpeg4<br />
</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://rubyfreaks.com/2009/07/13/15-useful-linux-media-related-commands/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Linux Server Security- Bare MINIMUM</title>
		<link>http://rubyfreaks.com/2009/06/25/linux-server-security-bare-minimum/</link>
		<comments>http://rubyfreaks.com/2009/06/25/linux-server-security-bare-minimum/#comments</comments>
		<pubDate>Thu, 25 Jun 2009 13:18:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://rubyfreaks.com/?p=94</guid>
		<description><![CDATA[1. On your firewall (you do have one don&#8217;t you?) check the incoming MySQL port and if 3306 is open, close it. If this port is left open it can pose both a security and server abuse threat since not only can hackers attempt to break into MySQL, any user can host their SQL database [...]]]></description>
			<content:encoded><![CDATA[<p>1.  <strong>On your firewall (you do have one don&#8217;t you?) check the incoming MySQL port and if 3306 is open, close it. If this port is left open it can pose both a security and server abuse threat since not only can hackers attempt to break into MySQL, any user can host their SQL database on your server and access it from another host and so (ab)use your server resources</strong></p>
<p>2. <strong>Check /tmp permissions. /tmp should be chmod 1777</strong></p>
<p>3. <strong>Check /tmp ownership /tmp should be owned by root:root</strong></p>
<p>4. <strong>Check /etc/cron.daily/logrotate for /tmp noexec workaround. Due to a bug in logrotate if /tmp is mounted with the noexec option, you need to have logrotate use a different temporary directory. If you don&#8217;t do this syslog may not restart correctly and will write to the wrong (older) log files</strong>.</p>
<p>5. <strong>Check /var/tmp permissions. /var/tmp should be chmod 1777</strong></p>
<p>6. <strong>Check /var/tmp ownership. /var/tmp should be owned by root:root</strong></p>
<p>7. <strong>Check /var/tmp is mounted as a filesystem. /var/tmp should either be symlinked to /tmp or mounted as a filesystem</strong></p>
<p>8. <strong>Check /var/tmp is mounted noexec,nosuid. /var/tmp isn&#8217;t mounted with the noexec,nosuid options (currently: none). You should consider adding a mountpoint into /etc/fstab for /var/tmp with those options</strong></p>
<p>9.<strong> Check /usr/tmp permissions. /usr/tmp should be chmod 1777</strong></p>
<p>10.<strong> Check /usr/tmp ownership. /usr/tmp should be owned by root:root</strong></p>
<p>11. <strong>Check /usr/tmp is mounted as a filesystem or is a symlink to /tmp. /usr/tmp should either be symlinked to /tmp or mounted as a filesystem.<br />
Check /etc/resolv.conf for localhost entry. You should not specify 127.0.0.1 or localhost as a nameserver in /etc/resolv.conf &#8211; use the servers main IP address instead</strong></p>
<p>12. <strong>Check /etc/named.conf for recursion restrictions. If you have a local DNS server running but do not have any recursion restrictions set in /etc/named.conf this is a security and performance risk and you should look at restricting recursive lookups to the local IP addresses only. Unrestricted recursive lookups are as good as a DDoS attack against your system. They will eat up all your system resources</strong></p>
<p>13. <strong>Check server runlevel. For a secure server environment you should only run the server at runlevel 3. You can fix this by editing /etc/inittab and changing the initdefault line to:<br />
id:3:initdefault: and then rebooting the server.</strong></p>
<p>14. <strong>Check nobody cron. You have a nobody cron log file &#8211; you should check that this has not been created by an exploit.</strong></p>
<p>15. <strong>Check Operating System support. Make certain that your OS version is still supported by the manufacturer and that upgrades continue to be available.</strong></p>
<p>16. <strong>Check SSHv1 is disabled. You should disable SSHv1 by editing /etc/ssh/sshd_config and setting: Protocol 2 (remove the hash # from in front of the line and edit out the 1.1)</strong></p>
<p>17. <strong>Check SSH on non-standard port. Moving SSH to a non-standard port avoids basic SSH port scans. Edit /etc/ssh/sshd_config and setting: Port nnnn Where nnnn is a port of your choosing. Don&#8217;t forget to open the port in the firewall first!</strong></p>
<p>18. <strong>Check SSH PasswordAuthentication. For ultimate SSH security, you might want to consider disabling PasswordAuthentication and only allow access using PubkeyAuthentication.</strong></p>
<p>19. <strong>Check telnet port 23 is not in use. Close this port in your firewall. Telnet is an insecure protocol and you should disable the telnet daemon if it is running</strong></p>
<p>20. <strong>Check shell resource limits. You should enable shell resource limits to prevent shell users from consuming server resources &#8211; DOS exploits typically do this. If you are using cPanel/WHM set Shell Fork Bomb Protection.</strong></p>
<p>21. <strong>Disable all instances of IRC &#8211; BitchX, bnc, eggdrop, generic-sniffers, guardservices, ircd, psyBNC, ptlink. If you are using WHM you can do this in the Background Process Killer.</strong></p>
<p>22.<strong> Check apache for mod_security if not installed install it from source.</strong></p>
<p>23. <strong>Check apache for mod_evasive. You should install the mod_evasive apache module from source to help prevent DOS attacks against apache. Note that this module breaks FrontPage functionality.</strong></p>
<p>24. <strong>Check apache for RLimitCPU. You should set a value RLimitCPU to prevent runaway scripts from consuming server resources &#8211; DOS exploits can typically do this.</strong></p>
<p>25. <strong>Check apache for RLimitMEM. You should set a value RLimitMEM to prevent runaway scripts from consuming server resources &#8211; DOS exploits can typically do this.</strong></p>
<p><strong></p>
]]></content:encoded>
			<wfw:commentRss>http://rubyfreaks.com/2009/06/25/linux-server-security-bare-minimum/feed/</wfw:commentRss>
		<slash:comments>34</slash:comments>
		</item>
		<item>
		<title>25 Useful Linux Commands</title>
		<link>http://rubyfreaks.com/2009/06/09/25-useful-linux-commands/</link>
		<comments>http://rubyfreaks.com/2009/06/09/25-useful-linux-commands/#comments</comments>
		<pubDate>Wed, 10 Jun 2009 04:45:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://rubyfreaks.com/?p=75</guid>
		<description><![CDATA[1 To get hard disk information. hdparm -I /dev/sda 2 Search and replace option in vi. :%s/old/new/g 3 To make an icon. convert -size 900&#215;120 xc:black -font Times-Roman -pointsize 100 -fill green -annotate +20+80 &#8216;Linux is the Best&#8217; -fill green -annotate +25+90 &#8216;Linux is the Best&#8217; -trim +repage logo1.png 4 To replace one word with [...]]]></description>
			<content:encoded><![CDATA[<p>1 To get hard disk information.<br />
<strong>hdparm -I /dev/sda</strong></p>
<p>2 Search and replace option in vi.<br />
<strong>:%s/old/new/g<br />
</strong><br />
3 To make an icon.<br />
<strong>convert -size 900&#215;120 xc:black -font Times-Roman -pointsize 100 -fill green -annotate +20+80 &#8216;Linux is the Best&#8217; -fill green -annotate +25+90 &#8216;Linux is the Best&#8217; -trim +repage logo1.png</strong></p>
<p>4 To replace one word with another with the backup of the original one.<br />
<strong>sed -ibackup s/orange/grapes/g sedd</strong></p>
<p>5 To search for a particular word and delete it.<br />
<strong>find / -name aaa* -delete</strong></p>
<p>6 To delete the last 30 days files. For files before 30 days +30.<br />
<strong>find /root/wallpapers/ -mtime -30 | xargs /bin/rm -f</strong></p>
<p>7 Command to dump partitions, directory etc..<br />
<strong>dump -0aj -f /back/mydump /dev/sda2</strong></p>
<p>8 Command to restore the dumped partition.<br />
<strong>restore -rf mydump /back</strong></p>
<p>9 To convert all jpeg files in the current directory to avi.<br />
<strong>mencoder &#8220;mf://*.jpg&#8221; -mf fps=1 -o outputs.avi -ovc lavc -lavcopts vcodec=mpeg4</strong></p>
<p>10 To convert avi to mpeg-2<br />
<strong>mencoder /root/ItalianJob.avi -mf fps=1 -o /opt/ItalianJob.mpg -ovc lavc -oac pcm -lavcopts vcodec=mpeg2video</strong></p>
<p>11 To convert mpg to avi.<br />
<strong>mencoder /editor/Seval.mpg -ovc xvid -oac mp3lame -xvidencopts bitrate=800 -o /opt/Seval.avi</strong></p>
<p>12 To delete lines 23-47 using vim or vi.<br />
<strong>:23,47 d<br />
</strong><br />
13 Command to display the installed fonts.<br />
<strong>fc-list</strong></p>
<p>14 To check the CD/DVD drive/eject.<br />
<strong>fuser /media/cdrom [eject]/[eject -p]</strong></p>
<p>15 To kill the process.<br />
<strong>fuser -k /media/cdrom</strong></p>
<p>16 Find all files that have the .exe extension in the current directory.<br />
<strong>find . -name \*.exe</strong></p>
<p>17 Lists all of the files in the queue, as well as the user, the job number, the size and the root directories from which the print jobs originate.<br />
<strong>lpq</strong></p>
<p>18 To free memory when memory is in short.<br />
<strong>memhog 500m</strong></p>
<p>19 Cron to shutdown machine.<br />
<strong>55 23 * * * /sbin/shutdown -h now</strong></p>
<p>20 To password protect a zip file.<br />
<strong>zip -e -r /root/Desktop/new /root/Desktop/old</strong></p>
<p>21 To delete all hidden files from current directory.<br />
<strong>rm -rf .*</strong></p>
<p> 22 Extracting files to a specific directory<br />
<strong>unzip Commonly\ Used\ Malayalam\ Fonts.zip -d /usr/share/X11/fonts/TTF/</strong> -(Sorry! I&#8217;m a Malayali)</p>
<p>23 To format CD-RW<br />
<strong>cdrecord blank=fast dev=1,0,0</strong></p>
<p>24 To stop all process except your shell.<br />
<strong>kill 0</strong></p>
<p>25 To disable usb in linux, eg. fedora 8.<br />
<strong>mv /lib/modules/2.6.23.1-42.fc8/kernel/drivers/usb/storage/usb-storage.ko /opt/</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://rubyfreaks.com/2009/06/09/25-useful-linux-commands/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
		<item>
		<title>25 Linux Command every one must know.</title>
		<link>http://rubyfreaks.com/2009/05/21/25-linux-command-every-one-mush-know/</link>
		<comments>http://rubyfreaks.com/2009/05/21/25-linux-command-every-one-mush-know/#comments</comments>
		<pubDate>Fri, 22 May 2009 06:22:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Add new tag]]></category>

		<guid isPermaLink="false">http://rubyfreaks.com/?p=36</guid>
		<description><![CDATA[ls &#8211; Display the contents of the current directory. pwd &#8211; Display Present working directory. cd .. &#8211; Change directories. cd - Enter into that directory. mv &#8211; Change the name of a directory. cp &#8211; Copy files and directories. startx &#8211; Start the GUI. halt &#8211; To shut down the system. kill/killall &#8211; Stop [...]]]></description>
			<content:encoded><![CDATA[<p><strong>ls </strong> &#8211; Display the contents of the current directory.<br />
<strong>pwd</strong> &#8211; Display Present working directory.<br />
<strong>cd .. </strong> &#8211; Change directories.<br />
<strong>cd </strong>- Enter into that directory.<br />
<strong>mv </strong> &#8211; Change the name of a directory.<br />
<strong>cp </strong> &#8211; Copy files and directories.<br />
<strong>startx </strong> &#8211; Start the GUI.<br />
<strong>halt </strong> &#8211; To shut down the system.<br />
<strong>kill/killall</strong> &#8211; Stop a process from running. The difference between the two commands is that kill requires the PID (process ID number) and killall requires only the executable name.<br />
<strong>logout</strong> &#8211; To quit using the system.<br />
<strong>mkdir</strong> &#8211; Make directories Create the Directory(ies), if they do not already exist.<br />
<strong>top </strong> &#8211; Displays the taks that are currently running.<br />
<strong>who</strong> &#8211; Show who is logged on.<br />
<strong>man</strong> &#8211; To help you understand how to use a command.<br />
<strong>mount/umount</strong> -Mount a file system.<br />
<strong>cal</strong> &#8211; Displays a calendar.<br />
<strong>clear</strong> &#8211; Clears the terminal screen.<br />
<strong>su/su-</strong> &#8211; Allows one user to temporarily become another user/ &#8211; Switching to root path.<br />
<strong>vi and nano</strong> &#8211; These are some most  widely used editors in linux.<br />
<strong>ps</strong> &#8211; Used to find process status.<br />
<strong>ifconfig</strong> &#8211; Configure a network interface and also to find the ip of machine.<br />
<strong>cat </strong> &#8211; Concatenate one or more files.<br />
<strong>find </strong> &#8211; Used to search files in a directory .<br />
<strong>free</strong> &#8211; Display statistics about memory usage.<br />
<strong>df-h </strong> &#8211; To find the amount of hard disk space and what’s free .</p>
]]></content:encoded>
			<wfw:commentRss>http://rubyfreaks.com/2009/05/21/25-linux-command-every-one-mush-know/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
		<item>
		<title>will_paginate-Ruby on Rails plugin</title>
		<link>http://rubyfreaks.com/2009/05/21/will_paginate-ruby-on-rails-plugin/</link>
		<comments>http://rubyfreaks.com/2009/05/21/will_paginate-ruby-on-rails-plugin/#comments</comments>
		<pubDate>Thu, 21 May 2009 10:04:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[ruby on rails]]></category>

		<guid isPermaLink="false">http://rubyfreaks.com/?p=29</guid>
		<description><![CDATA[&#8216;will_paginate&#8216; is one of the most widely used plugins in most of the ruby on rails projects.will_paginate is an alternative to the classic_pagination plugin, which is the pagination plugin that basically took the pre Rails 2.0 pagination implementation and packaged it in plugin form 1.How to Install will_paginate the simple method gem install mislav-will_paginate There [...]]]></description>
			<content:encoded><![CDATA[<p>&#8216;<strong>will_paginate</strong>&#8216; is one of the most widely used plugins in most of the ruby on rails projects.will_paginate is an alternative to the classic_pagination plugin, which is the pagination plugin that basically took the pre Rails 2.0 pagination implementation and packaged it in plugin form<br />
1.How to Install will_paginate<br />
   the simple method<br />
   <strong>gem install mislav-will_paginate</strong></p>
<p>There are some other method you can find it <a href="http://wiki.github.com/mislav/will_paginate/installation">here</a>.</p>
<p>2.Example </p>
<p>In controller<br />
<strong>@gallery=Gallery.find(:all,:order=>&#8221;position asc&#8221;).paginate :page => page,:per_page=>10</strong></p>
<p>where <strong>:per_page</strong> passes the number of gallery you want to display.You can change it according to your need 1-100<br />
will_paginate defines it to be <b>30</b> by default</p>
<p>In View</p>
<p>you can simply use</p>
<p><strong><%= will_paginate @gallery %></strong><br />
 some advanced &#8230;</p>
<p><strong><% if @gallery.previous_page %><br />
 <%= will_paginate @gallery,:page_links=>false, :next_label => &#8220;&#8221;, :prev_label => image_tag(&#8220;/images/icon/arrow.png&#8221;, :border => &#8220;0&#8243;)  %><br />
 <% end %></strong></p>
<p><strong><% if @gallery.next_page %><br />
<%= will_paginate @gallery,:page_links=>false, :next_label => image_tag(&#8220;/images/icon/arrow.png&#8221;,, :border => &#8220;0&#8243;), :prev_label => &#8220;&#8221;  %><br />
 <% end %></strong></p>
<p>If we put <strong>page_links=>false</strong> then it won&#8217;t display 1,2,3&#8230; and <strong>next_label and prev_label => &#8220;&#8221; </strong>as null it won&#8217;t display Next and Prev</p>
<p>Ryan Bates made an awesome screencast check it out<a href="http://railscasts.com/episodes/51"> here</a></p>
]]></content:encoded>
			<wfw:commentRss>http://rubyfreaks.com/2009/05/21/will_paginate-ruby-on-rails-plugin/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Install Ruby on Rails in Linux</title>
		<link>http://rubyfreaks.com/2008/10/13/install-ruby-on-rails-in-linux/</link>
		<comments>http://rubyfreaks.com/2008/10/13/install-ruby-on-rails-in-linux/#comments</comments>
		<pubDate>Mon, 13 Oct 2008 15:28:05 +0000</pubDate>
		<dc:creator>rubyfreaks</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[ruby on rails]]></category>

		<guid isPermaLink="false">http://railsfreak.wordpress.com/?p=3</guid>
		<description><![CDATA[How to install Ruby on Rails In Linux $ su - # yum install ruby ruby-rdoc ruby-irb Note: If you get an error, similar to the following, just wait a while and try the above command again. Loading &#8220;installonlyn&#8221; plugin Existing lock /var/run/yum.pid: another copy is running as pid 2321. Aborting. Note: If you get [...]]]></description>
			<content:encoded><![CDATA[<p><strong>How to install Ruby on Rails In Linux</strong></p>
<p><strong>$ su -<br />
# yum install ruby ruby-rdoc ruby-irb<br />
</strong><br />
Note: If you get an error, similar to the following, just wait a while and try the above command again.</p>
<p><strong>Loading &#8220;installonlyn&#8221; plugin<br />
Existing lock /var/run/yum.pid: another copy is running as pid 2321. Aborting.</strong></p>
<p>Note: If you get something similar to the following, just enter y.</p>
<p>warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID 4f2a6fd2<br />
Importing GPG key 0x4F2A6FD2 &#8220;Fedora Project &#8221; from /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora<br />
Is this ok [y/N]:</p>
<p>Install RubyGems via source</p>
<p>Note: Note: Latest version of RubyGems (1.3.3) .<br />
Enter into the Terminal:</p>
<p>cd /tmp<br />
wget http://rubyforge.org/frs/download.php/20989/rubygems-0.9.4.tgz<br />
tar -zxvf rubygems-0.9.4.tgz<br />
cd rubygems-0.9.4<br />
# ruby setup.rb</p>
<p>Install Ruby on Rails using RubyGems</p>
<p>Enter into the Terminal:</p>
<p><strong># gem install -y rails</strong></p>
<p>To check the installed gems on your local machine<br />
<strong> gem list &#8211;local</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://rubyfreaks.com/2008/10/13/install-ruby-on-rails-in-linux/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
