<?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>jusupov.com &#187; freelance</title>
	<atom:link href="http://www.jusupov.com/category/freelance/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jusupov.com</link>
	<description>Computer Technology Blog</description>
	<lastBuildDate>Thu, 06 May 2010 16:04:20 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to monitor disk space in Linux boxes</title>
		<link>http://www.jusupov.com/2007/05/11/how-to-monitor-disk-space-in-linux-boxes/</link>
		<comments>http://www.jusupov.com/2007/05/11/how-to-monitor-disk-space-in-linux-boxes/#comments</comments>
		<pubDate>Fri, 11 May 2007 07:34:06 +0000</pubDate>
		<dc:creator>Arstan</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[freelance]]></category>

		<guid isPermaLink="false">http://www.jusupov.com/2007/05/11/how-to-monitor-disk-space-in-linux-boxes/</guid>
		<description><![CDATA[Sometimes, you will need to monitor your disk space on some linux servers in your network. You may install monitoring tools like Zabbix, however this may be too much, may be you just need to monitor disk usage on the box. You can use this script to e-mail you every morning with the disk usage [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes, you will need to monitor your disk space on some linux servers in your network. You may install monitoring tools like <a href="http://www.zabbix.org" target="_blank">Zabbix</a>, however this may be too much, may be you just need to monitor disk usage on the box. You can use this script to e-mail you every morning with the disk usage on the box:</p>
<pre>#!/bin/sh
address="root@localhost";
cicl="2 3 4 5 6";
# ?????????? ? ????????? ????? ???????????? ????? ??? ??????? ???????,
# ??? ??????? ?????????? ?????????
predel[2]=80;	# /
predel[3]=80;	# /usr
predel[4]=60;	# /var
predel[5]=80;	# /tmp
predel[6]=80;	# /home
varning="0";

count=0;
df -h &gt; /tmp/tmp_df;
while read -r FS S Ud A U MO; do
	let count+=1;
	FileSystem[$count]=$FS;
	Size[$count]=$S;
	Used[$count]=$Ud;
	Avail[$count]=$A;
	Use[$count]=$U;
	MountedOn[$count]=$MO;
	NUse[$count]=${Use[$count]%"%"};
done &lt; /tmp/tmp_df;
table="";
for c in $cicl; do
	if [[ ${NUse[$c]} -ge ${predel[c]} ]]; then
		varning="1";
		table=$table"n${FileSystem[$c]} t${Size[$c]} t${Used[$c]} t${Avail[$c]} t${Use[$c]} t${MountedOn[$c]}";
	fi
done
		shapka="nFileSystem tSize tUsed tAvail tUse tMounted On";
		body="Regard admin, please check, place on disk:"$shapka$table;
		#echo -e $body;
if [ $varning -eq "1" ];
    then
	echo -e $body | mail -s"Warning on server" $address;
	logger -i -p cron.warn -t dfmonitor "Send warning to $address";
    else
	logger -i -p cron.info -t dfmonitor " Place on disk in rate";
fi</pre>
<p>You can call this shell script whatever you want and don&#8217;t forget to add this into your crontabs.</p>
<p>The script is courtesy of <a href="http://www.opennet.ru/tips/info/1405.shtml" target="_blank">OpenNet.Ru </a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jusupov.com/2007/05/11/how-to-monitor-disk-space-in-linux-boxes/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Free fonts for your applications</title>
		<link>http://www.jusupov.com/2007/05/09/free-fonts-for-your-applications/</link>
		<comments>http://www.jusupov.com/2007/05/09/free-fonts-for-your-applications/#comments</comments>
		<pubDate>Wed, 09 May 2007 17:23:44 +0000</pubDate>
		<dc:creator>Arstan</dc:creator>
				<category><![CDATA[ReviewMe Reviews]]></category>
		<category><![CDATA[freelance]]></category>

		<guid isPermaLink="false">http://www.jusupov.com/2007/05/09/free-fonts-for-your-applications/</guid>
		<description><![CDATA[Sponsored Post
When developing a website or a web applications we sometimes need different fonts to be used then the usuals. Be it just navigation buttons, site slogan or a CAPTCHA code. At Urban Fonts you can download free fonts for your usage, or if it is not enough you can browse through paid ones, pick [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Sponsored Post</strong></p>
<p><a href="http://www.urbanfonts.com" target="_blank"><img src="http://www.jusupov.com/wp-content/uploads/2007/05/logo.gif" alt="logo.gif" align="right" border="0" /></a>When developing a website or a web applications we sometimes need different fonts to be used then the usuals. Be it just navigation buttons, site slogan or a <a href="http://www.jusupov.com/2007/04/12/how-to-prevent-bots-spamming-your-forms/" target="_blank">CAPTCHA</a> code. At Urban Fonts you can download <a href="http://www.urbanfonts.com" target="_blank">free fonts</a> for your usage, or if it is not enough you can browse through paid ones, pick the right font for your application and buy it online!</p>
<p>The website, unlike other free font offering websites, is designed very user friendly. The fonts are organized in alphabetic format for your convenience, and has a preview when you mouse over them. You can even browse through <a href="http://www.urbanfonts.com/fonts/font-authors.htm" target="_blank">authors</a> and pick the fonts which he designed. You can check out the <a href="http://www.urbanfonts.com/fonts/new-fonts.htm" target="_blank">latest additions</a> to the font collection and their <a href="http://www.urbanfonts.com/fonts/our-favorite-fonts.htm" target="_blank">favourites</a> picks.<br />
Especially, I loved that it is clearly stated for which fonts you have to pay and which fonts you can just download for free. Now, let&#8217;s be honest, everybody likes freebies!</p>
<p>Paid fonts can be purchased for a $24 USD and gives you much more options then the <a href="http://www.urbanfonts.com" target="_blank">free fonts</a>.</p>
<p>Urban Fonts has a <a href="http://www.urbanfonts.com/blog/" target="_blank">blog</a> and a <a href="http://forum.urbanfonts.com/forumdisplay.php?f=1" target="_blank">forum</a> to help with the PR.</p>
<p>So if you are a web designer, web developer or just looking for free and yet quality fonts, Urban Fonts has it all for you!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jusupov.com/2007/05/09/free-fonts-for-your-applications/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Why server side validation is important or why spammers love JavaScript validations</title>
		<link>http://www.jusupov.com/2007/05/04/why-server-side-validation-is-important-or-why-spammers-love-javascript-validations/</link>
		<comments>http://www.jusupov.com/2007/05/04/why-server-side-validation-is-important-or-why-spammers-love-javascript-validations/#comments</comments>
		<pubDate>Fri, 04 May 2007 07:20:33 +0000</pubDate>
		<dc:creator>Arstan</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[freelance]]></category>

		<guid isPermaLink="false">http://www.jusupov.com/2007/05/04/why-server-side-validation-is-important-or-why-spammers-love-javascript-validations/</guid>
		<description><![CDATA[It was those days when you could just leave your email out there, have contact, registration and etc forms without any forced validations, only few companies like Yahoo! had CAPTCHA validations&#8230;
Yes, those were the days! But now we have JavaScript, CAPTCHA, Audio, Server Side validations to avoid spam and misuse of the forms.
Now, when you [...]]]></description>
			<content:encoded><![CDATA[<p>It was those days when you could just leave your email out there, have contact, registration and etc forms without any forced validations, only few companies like <a href="http://www.yahoo.com">Yahoo!</a> had <a href="http://en.wikipedia.org/wiki/Captcha">CAPTCHA</a> validations&#8230;</p>
<p>Yes, those were the days! But now we have JavaScript, CAPTCHA, Audio, Server Side validations to avoid spam and misuse of the forms.</p>
<p>Now, when you are preparing a simple contact form which will email you submissions or feedback form for your company, order forms etc it is come to a point where JavaScript validation is not sufficient. Spammers do love JavaScript validations because they can just bypass them easily. Try it yourself, go find that kind of contact forms and disable JavaScript on your browser and just hit Submit button. See, it says submitted successfully. <span id="more-97"></span></p>
<p><a href="http://phpsec.org/">PHPSec.org</a> has a <a href="http://phpsec.org/projects/guide/2.html">very nice article</a> on this.</p>
<p>Not only they can bypass the required fields but they spoof your form with invalid data and spam you. A simple example:</p>
<p>In order to appreciate the necessity of data filtering, consider the following form located (hypothetically speaking) at http://example.org/form.html:</p>
<p>&lt;form action=&#8221;/process.php&#8221; method=&#8221;POST&#8221;&gt;<br />
&lt;select name=&#8221;color&#8221;&gt;<br />
&lt;option value=&#8221;red&#8221;&gt;red&lt;/option&gt;<br />
&lt;option value=&#8221;green&#8221;&gt;green&lt;/option&gt;<br />
&lt;option value=&#8221;blue&#8221;&gt;blue&lt;/option&gt;<br />
&lt;/select&gt;<br />
&lt;input type=&#8221;submit&#8221; /&gt;<br />
&lt;/form&gt;</p>
<p>Imagine a potential attacker who saves this HTML and modifies it as follows:</p>
<p>&lt;form action=&#8221;http://example.org/process.php&#8221; method=&#8221;POST&#8221;&gt;<br />
&lt;input type=&#8221;text&#8221; name=&#8221;color&#8221; /&gt;<br />
&lt;input type=&#8221;submit&#8221; /&gt;<br />
&lt;/form&gt;</p>
<p>This new form can now be located anywhere (a web server is not even necessary, since it only needs to be readable by a web browser), and the form can be manipulated as desired. The absolute URL used in the action attribute causes the POST request to be sent to the same place.</p>
<p>This makes it very easy to eliminate any client-side restrictions, whether HTML form restrictions or client-side scripts intended to perform some rudimentary data filtering. In this particular example, $_POST['color'] is not necessarily red, green, or blue. With a very simple procedure, any user can create a convenient form that can be used to submit any data to the URL that processes the form.</p>
<p>Spoofed HTTP Requests</p>
<p>A more powerful, although less convenient approach is to spoof an HTTP request. In the example form just discussed, where the user chooses a color, the resulting HTTP request looks like the following (assuming a choice of red):</p>
<p>POST /process.php HTTP/1.1<br />
Host: example.org<br />
Content-Type: application/x-www-form-urlencoded<br />
Content-Length: 9</p>
<p>color=red</p>
<p>The telnet utility can be used to perform some ad hoc testing. The following example makes a simple GET request for http://www.php.net/:</p>
<p>$ telnet www.php.net 80<br />
Trying 64.246.30.37&#8230;<br />
Connected to rs1.php.net.<br />
Escape character is &#8216;^]&#8217;.<br />
GET / HTTP/1.1<br />
Host: www.php.net</p>
<p>HTTP/1.1 200 OK<br />
Date: Wed, 21 May 2004 12:34:56 GMT<br />
Server: Apache/1.3.26 (Unix) mod_gzip/1.3.26.1a PHP/4.3.3-dev<br />
X-Powered-By: PHP/4.3.3-dev<br />
Last-Modified: Wed, 21 May 2004 12:34:56 GMT<br />
Content-language: en<br />
Set-Cookie: COUNTRY=USA%2C12.34.56.78; expires=Wed,28-May-04 12:34:56 GMT; path=/; domain=.php.net<br />
Connection: close<br />
Transfer-Encoding: chunked<br />
Content-Type: text/html;charset=ISO-8859-1</p>
<p>2083<br />
&lt;!DOCTYPE HTML PUBLIC &#8220;-//W3C//DTD HTML 4.01Transitional//EN&#8221;&gt;<br />
&#8230;</p>
<p>Of course, you can write your own client instead of manually entering requests with telnet. The following example shows how to perform the same request using PHP:</p>
<p>&lt;?php</p>
<p>$http_response = &#8221;;</p>
<p>$fp = fsockopen(&#8216;www.php.net&#8217;, 80);<br />
fputs($fp, &#8220;GET / HTTP/1.1\r\n&#8221;);<br />
fputs($fp, &#8220;Host: www.php.net\r\n\r\n&#8221;);</p>
<p>while (!feof($fp))<br />
{<br />
$http_response .= fgets($fp, 128);<br />
}</p>
<p>fclose($fp);</p>
<p>echo nl2br(htmlentities($http_response));</p>
<p>?&gt;</p>
<p>Sending your own HTTP requests gives you complete flexibility, and this demonstrates why server-side data filtering is so essential. Without it, you have no assurances about any data that originates from any external source.</p>
<p>So, let&#8217;s make a lesson out of this and validate forms on the server side, validate HTTP requests and headers before we process the forms.</p>
<p>via &#8211; <a href="http://phpsec.org/projects/guide/2.html">http://phpsec.org/projects/guide/2.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jusupov.com/2007/05/04/why-server-side-validation-is-important-or-why-spammers-love-javascript-validations/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Exabytes and time</title>
		<link>http://www.jusupov.com/2007/03/27/exabytes-and-time/</link>
		<comments>http://www.jusupov.com/2007/03/27/exabytes-and-time/#comments</comments>
		<pubDate>Wed, 28 Mar 2007 03:29:42 +0000</pubDate>
		<dc:creator>Arstan</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[freelance]]></category>

		<guid isPermaLink="false">http://www.jusupov.com/2007/03/27/exabytes-and-time/</guid>
		<description><![CDATA[I was doing one freelance work where I had to use LAMP technology. So my client has ordered hosting from Exabytes. Interestingly I had some bugs on theirs servers. I digged some more and I find out that their PHP time is wrong. Here&#8217;s the screenshot:

As you can see from the screenshot the server shows [...]]]></description>
			<content:encoded><![CDATA[<p>I was doing one freelance work where I had to use <a href="http://en.wikipedia.org/wiki/LAMP_%28software_bundle%29" title="Linux Apache MySQL PHP">LAMP </a>technology. So my client has ordered hosting from <a href="http://www.exabytes.com/" title="Exabytes">Exabytes</a>. Interestingly I had some bugs on theirs servers. I digged some more and I find out that their PHP time is wrong. Here&#8217;s the screenshot:</p>
<p><a href="http://www.jusupov.com/wp-content/uploads/2007/03/time.jpg" onclick="return false;" title="Direct link to file"><img src="http://www.jusupov.com/wp-content/uploads/2007/03/time.thumbnail.jpg" alt="time.jpg" height="103" width="171" /></a></p>
<p>As you can see from the screenshot the server shows a date with more then 1 day difference! Well, I&#8217;ve never bothered to check if the servers were from US or local, I was under impression that they were local. Well, seems like not! So that&#8217;s how I get a almost a day difference in dates!</p>
<p>I used very basic date functions to get the date shown on their servers. The code is taken from <a href="http://my2.php.net/date" title="Dates in PHP">php.net </a> and now I need to add the difference to get Malaysian time.</p>
<p>I will post my solutions here, stay tuned!</p>
<p><strong>Update:</strong>  I used very simple code:</p>
<p>$h = &#8220;-8&#8243;;// Hour for time zone goes here e.g. +7 or -4, just remove the + or -<br />
$hm = $h * 60;<br />
$ms = $hm * 60;</p>
<p>if (!$date) {<br />
$date=date(&#8220;Y-m-d&#8221;);<br />
$getdate = gmdate(&#8220;Y-m-d&#8221;, time()-($ms));</p>
<p>}</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jusupov.com/2007/03/27/exabytes-and-time/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>ATM Monitoring in Ambank</title>
		<link>http://www.jusupov.com/2007/03/13/atm-monitoring-in-ambank/</link>
		<comments>http://www.jusupov.com/2007/03/13/atm-monitoring-in-ambank/#comments</comments>
		<pubDate>Tue, 13 Mar 2007 07:01:53 +0000</pubDate>
		<dc:creator>Arstan</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[freelance]]></category>

		<guid isPermaLink="false">http://www.jusupov.com/2007/03/13/atm-monitoring-in-ambank/</guid>
		<description><![CDATA[Recently, I had the opportunity with three other vendors/freelancers to come up with a solution for their M$ ACCESS based &#8220;application&#8221; which record downtime of their ATMs. Basically it&#8217;s a .mdb file which is shared on a ms win server folder.
Before everything else, I was surprised how they &#8220;monitor&#8221; their ATM machines!  They literally watched [...]]]></description>
			<content:encoded><![CDATA[<p>Recently, I had the opportunity with three other vendors/freelancers to come up with a solution for their M$ ACCESS based &#8220;application&#8221; which record downtime of their ATMs. Basically it&#8217;s a .mdb file which is shared on a ms win server folder.</p>
<p>Before everything else, I was surprised how they &#8220;monitor&#8221; their ATM machines!  They literally watched the ATM reporting screen to see if the ATM was down.  I mean, a person is allocated for this task &#8211; just sit and stare at the monitor, if the ATM status goes down he needs to open their &#8220;application&#8221; and enter the downtime.</p>
<p>Anyway, they did a small presentation of their usage of this &#8220;application&#8221; and their expectation.  They wanted some applications which will replace theirs.  &#8220;Replace&#8221; not as in enhance or add-on new functions.  They just want to keep the way they &#8220;monitor&#8221;.</p>
<p>I must note that I was contacted long before this meeting with regard to this matter and I was planning to use Perl/Shell scripting in Linux to do all of this with a LAMP interface for reporting purposes.  But, it turns out that all their infrastructure as well as IT team is pro-Microsoft.  What to do?  They just want it in some Microsoft .NET or Visual Basic (is it the same now?).  So, unfortunately we fail.</p>
<p>We proposed to them a fully automated uptime/downtime tracking facility with auto generation of reports in Excel/PDF.</p>
<p>What I don&#8217;t understand is why they find it all right to have somebody just sit and watch the ATM monitor screen.  It&#8217;s wasting resources for nothing, instead of hiring/training a person to use Open Source stuff and make everybody&#8217;s life easy?</p>
<p>And, of course, some extra cash for me?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jusupov.com/2007/03/13/atm-monitoring-in-ambank/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
