<?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>Alex Filatov &#187; Nice to Have</title>
	<atom:link href="http://www.alexfilatov.com/category/nice-to-have/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.alexfilatov.com</link>
	<description>My online private property</description>
	<lastBuildDate>Mon, 26 Jul 2010 22:05:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Symfony sfAssetsLibraryPlugin assets resize script</title>
		<link>http://www.alexfilatov.com/2009/08/25/symfony-sfassetslibraryplugin-assets-resize-script/</link>
		<comments>http://www.alexfilatov.com/2009/08/25/symfony-sfassetslibraryplugin-assets-resize-script/#comments</comments>
		<pubDate>Tue, 25 Aug 2009 15:21:24 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[Nice to Have]]></category>
		<category><![CDATA[Symfony]]></category>
		<category><![CDATA[batch]]></category>
		<category><![CDATA[sfAssetsLibraryPlugin]]></category>

		<guid isPermaLink="false">http://www.alexfilatov.com/?p=111</guid>
		<description><![CDATA[Hi there! I&#8217;d like to share with this pretty simple script with you, hope it will save you few minutes. You guys who familiar with this Symfony plugin for assets management probably know that it uses sfThumbnail plugin for making thumbnails of image assets. sfThumbnail has configuration in app.yml and it looks like: all: sfAssetsLibrary: [...]]]></description>
			<content:encoded><![CDATA[<p>Hi there!</p>
<p>I&#8217;d like to share with this pretty simple script with you, hope it will save you few minutes.</p>
<p>You guys who familiar with this  Symfony plugin for assets management probably know that it uses sfThumbnail plugin for making thumbnails of image assets.<br />
sfThumbnail has configuration in app.yml and it looks like:</p>
<pre class="brush: js">all:
  sfAssetsLibrary:
    upload_dir:       media                  # Asset library root, under the web/ dir
    check_type:       false                  # Set to true if you want to restrict the type of assets
    types:            ['image']  # Accepted asset types if check_type is true
    thumbnail_dir:    thumbnail              # Where the image thumbnails are stored
    use_ImageMagick:  false                  # Set to true if you have the convert command
    thumbnails:                              # Name and size (in pixels) of the thumbnails created at upload
      tiny:                                 # Displayed in the list page
        width: 70
        height: 70
      small:                                 # Displayed in the list page
        width: 100
        height: 100
        shave: false                          # Cut strips to constraint the image size
      middle:
        width: 200
        height: 200
      large:                                 # Displayed in the details page
        width: 450
        height: 450
      original:                                 # Displayed in the details page
        width: 800
        height: 800
    search_pager_size: 20                    # Number of resuts per page
    mass_upload_size:  5                     # Number of file upload controls displayed in the mass upload form</pre>
<p>This is cool but when you have your project up and running and decided to add new type of thumbnail (for instance name it &#8216;big&#8217;)</p>
<pre style="font: normal normal normal 12px/18px Consolas, Monaco, 'Courier New', Courier, monospace;">      big:
        width: 400
        height: 400</pre>
<div>you&#8217;ll have a problem: you need to resize all old images according to new thumbnail type.</div>
<p><span id="more-111"></span>&#8220;This is simple science&#8221; &#8211; you need to get all assets objects and resize them in the following way:<br />
1. Create batch script in you symfony batch folder:</p>
<pre class="brush: text">$ symfony init-batch default dev mybatchname</pre>
<p>Also make sure that it users &#8216;backend&#8217; application (or application that uses sfAssetAdmin module)</p>
<p>2. Place content from the following code block into your batch script</p>
<pre class="brush: js"> &lt;?php /* sfAssets resizer batch script</pre>
<pre class="brush: js"> *
 * !!! BEFORE RUN THIS SCRIPT BACKUP YOUR ASSETS FOLDER !!!
 *
 * This batch script resizes all image assets stored by sfAssetsLibraryPlugin plugin
 * If you changed thumbnails' dimentions or added new you'd love this script.
 * Just make changes to your app.yml and run this script.
 * This script doesn't deletes any assets from disk - it's overwrites.
 *
 * @package    alexfilatov
 * @subpackage batch
 * @author     Alex Filatov http://www.alexfilatov.com
 */

define('SF_ROOT_DIR',    realpath(dirname(__file__).'/..'));
define('SF_APP',         'backend');
define('SF_ENVIRONMENT', 'dev');
define('SF_DEBUG',       1);

require_once(SF_ROOT_DIR.DIRECTORY_SEPARATOR.'apps'.DIRECTORY_SEPARATOR.SF_APP.DIRECTORY_SEPARATOR.'config'.DIRECTORY_SEPARATOR.'config.php');

// initialize database manager

$databaseManager = new sfDatabaseManager();
$databaseManager-&gt;initialize();

// batch process starts here
// If you have a lot of records you should refine this using hydration
$c = new Criteria();
$c-&gt;add(sfAssetPeer::TYPE, 'image');
$assets = sfAssetPeer::doSelect($c);

foreach ($assets as $asset) {
	echo 'Processing ' . SF_ROOT_DIR.DIRECTORY_SEPARATOR.'/web/'.$asset-&gt;getFolderPath() . ':' . $asset-&gt;getFilename() . '...';
	sfAssetsLibraryTools::createThumbnails($asset-&gt;getFolderPath(), $asset-&gt;getFilename());
	echo "done!n";
}
// batch process ends here

?&gt;</pre>
<p>3. Run it</p>
<pre class="brush: text">php mybatchname.php</pre>
<p>Important notice: if you have a lot of image assets (thousands) you need to refine this script using object hydration.<br />
I&#8217;ll do it later, just to let you know.<br />
Peace! <img src='http://www.alexfilatov.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.alexfilatov.com/2009/08/25/symfony-sfassetslibraryplugin-assets-resize-script/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Typographic Design Patterns and Best Practices</title>
		<link>http://www.alexfilatov.com/2009/08/21/typographic-design-patterns-and-best-practices/</link>
		<comments>http://www.alexfilatov.com/2009/08/21/typographic-design-patterns-and-best-practices/#comments</comments>
		<pubDate>Fri, 21 Aug 2009 07:31:09 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[Nice to Have]]></category>
		<category><![CDATA[best practices]]></category>
		<category><![CDATA[smashing magazine]]></category>
		<category><![CDATA[typography]]></category>

		<guid isPermaLink="false">http://www.alexfilatov.com/?p=98</guid>
		<description><![CDATA[Just read interesting article on Smashing magazine regarding best practicies in website typography. Conclusion: The study shows a clear set of common practices and guidelines for setting type in Web design. Note, though, that these findings are not scientific and should serve only as rough guidelines: Either serif or sans-serif fonts are fine for body [...]]]></description>
			<content:encoded><![CDATA[<p>Just read interesting article on <a href="http://www.smashingmagazine.com">Smashing magazine</a> regarding best practicies in website typography.</p>
<p><strong>Conclusion: </strong></p>
<p style="font-size: 12px; margin-top: 13px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 1.72em;">The study shows a clear set of common practices and guidelines for setting type in Web design. Note, though, that these findings are not scientific and should serve only as rough guidelines:</p>
<ol style="font-size: 12px; margin-top: 1px; margin-right: 0px; margin-bottom: 1px; margin-left: 0.5em;">
<li style="font-size: 12px; padding-top: 8px; margin: 0px;">Either serif or sans-serif fonts are fine for body copy and headings, but sans-serif fonts are still more popular for both.</li>
<li style="font-size: 12px; padding-top: 8px; margin: 0px;">Common choices for headlines are Georgia, Arial and Helvetica.</li>
<li style="font-size: 12px; padding-top: 8px; margin: 0px;">Common choices for body copy are Georgia, Arial, Verdana and Lucida Grande.</li>
<li style="font-size: 12px; padding-top: 8px; margin: 0px;">The most popular font size for headings is a range between 18 and 29 pixels.</li>
<li style="font-size: 12px; padding-top: 8px; margin: 0px;">The most popular font size for body copy is a range between 12 and 14 pixels.</li>
<li style="font-size: 12px; padding-top: 8px; margin: 0px;">Header font size ÷ Body copy font size = 1.96.</li>
<li style="font-size: 12px; padding-top: 8px; margin: 0px;">Line height (pixels) ÷ body copy font size (pixels) = 1.48.</li>
<li style="font-size: 12px; padding-top: 8px; margin: 0px;">Line length (pixels) ÷ line height (pixels) = 27.8.</li>
<li style="font-size: 12px; padding-top: 8px; margin: 0px;">Space between paragraphs (pixels) ÷ line height (pixels) = 0.754.</li>
<li style="font-size: 12px; padding-top: 8px; margin: 0px;">The optimal number of characters per line is between 55 and 75, but between 75 and 85 characters per line is more popular,</li>
<li style="font-size: 12px; padding-top: 8px; margin: 0px;">Body text is left-aligned, image replacement is rarely used and links are either underlined or highlighted with bold or color.</li>
</ol>
<p>Read full article here: <a href="http://www.smashingmagazine.com/2009/08/20/typographic-design-survey-best-practices-from-the-best-blogs/">Typographic Design Patterns and Best Practices</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.alexfilatov.com/2009/08/21/typographic-design-patterns-and-best-practices/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>New Online Resource for Symfony developers</title>
		<link>http://www.alexfilatov.com/2007/11/20/new-online-resource-for-symfony-developers/</link>
		<comments>http://www.alexfilatov.com/2007/11/20/new-online-resource-for-symfony-developers/#comments</comments>
		<pubDate>Tue, 20 Nov 2007 11:10:54 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[Nice to Have]]></category>
		<category><![CDATA[Symfony]]></category>

		<guid isPermaLink="false">http://www.alexfilatov.com/2007/11/20/new-online-resource-for-symfony-developers/</guid>
		<description><![CDATA[Today I&#8217;ve found interesting and useful Symfony resource www.SymfonyLab.com. The owner of this resource, Nazar Voznyak, is the official contributor of the Symfony Project, had written a lot of Symony plugins available for free from this site or from the official Symfony website. Congratulations, Nazar, you&#8217;re doing great work!]]></description>
			<content:encoded><![CDATA[<p>Today I&#8217;ve found interesting and useful Symfony resource <a href="http://www.symfonylab.com/">www.SymfonyLab.com</a>.</p>
<p>The owner of this resource, Nazar Voznyak, is the official contributor of the Symfony Project, had written a lot of <a href="http://www.symfonylab.com/plugins/">Symony plugins</a> available for free from this site or from the <a href="http://www.symfony-project.com">official Symfony website</a>.</p>
<p>Congratulations, Nazar, you&#8217;re doing great work!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.alexfilatov.com/2007/11/20/new-online-resource-for-symfony-developers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Symfony Propel DB Schema Reference</title>
		<link>http://www.alexfilatov.com/2007/07/05/symfony-propel-db-schema-reference/</link>
		<comments>http://www.alexfilatov.com/2007/07/05/symfony-propel-db-schema-reference/#comments</comments>
		<pubDate>Thu, 05 Jul 2007 15:38:57 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[Nice to Have]]></category>
		<category><![CDATA[Symfony]]></category>

		<guid isPermaLink="false">http://www.alexfilatov.com/2007/07/05/symfony-propel-db-schema-reference/</guid>
		<description><![CDATA[This is must have link. Propel DB Schema Reference Because all new Symfony project must be started from creating such DB schema.]]></description>
			<content:encoded><![CDATA[<p>This is must have link.</p>
<p><a href="http://propel.phpdb.org/docs/user_guide/chapters/appendices/AppendixB-SchemaReference.html" target="_blank">Propel DB Schema Reference</a></p>
<p>Because all new Symfony project must be started from creating such DB schema.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.alexfilatov.com/2007/07/05/symfony-propel-db-schema-reference/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Track Clicks on AdSense ads with Google Analytics</title>
		<link>http://www.alexfilatov.com/2007/06/01/nice-adsense-clicks-tracking-tool/</link>
		<comments>http://www.alexfilatov.com/2007/06/01/nice-adsense-clicks-tracking-tool/#comments</comments>
		<pubDate>Fri, 01 Jun 2007 09:24:43 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[Nice to Have]]></category>

		<guid isPermaLink="false">http://www.alexfilatov.com/2007/06/01/nice-adsense-clicks-tracking-tool/</guid>
		<description><![CDATA[Have fould nice script that tracks clicks on your AdSense ads with Google Analytics. Briefly: How does it work? Setup is quite simple. Small javascript file is added to your web page and that&#8217;s it. This script listens for ad clicks and reports them to Google Analytics (analytics code has to be already installed in [...]]]></description>
			<content:encoded><![CDATA[<p>Have fould nice script that tracks clicks on your AdSense ads with Google Analytics.</p>
<p>Briefly:<br />
<strong><br />
How does it work?</strong></p>
<p>Setup is quite simple. Small javascript file is added to your web page and that&#8217;s it. This script listens for ad clicks and reports them to Google Analytics (analytics code has to be already installed in the web pages). GoogleAnalytics interface is than used to interpret tracking results.</p>
<p>Big thanks to original poster and here is more details in the original article <a href="http://asp-net-whidbey.blogspot.com/2006/03/tracking-adsense-clicks-with-google.html">Tracking AdSense clicks with Google Analytics</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.alexfilatov.com/2007/06/01/nice-adsense-clicks-tracking-tool/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Great Offer for All Who Own Internet Business!</title>
		<link>http://www.alexfilatov.com/2007/05/08/great-offer-for-all-who-own-internet-business/</link>
		<comments>http://www.alexfilatov.com/2007/05/08/great-offer-for-all-who-own-internet-business/#comments</comments>
		<pubDate>Tue, 08 May 2007 21:07:53 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[Nice to Have]]></category>

		<guid isPermaLink="false">http://www.alexfilatov.com/2007/05/08/great-offer-for-all-who-own-internet-business/</guid>
		<description><![CDATA[Everybody who owns business in the Internet probably sometimes needed a website hosting. Personally I have two servers by Godaddy.com and glad of it. But today I&#8217;ve found very-very interesting offer from Lunarpages and started thinking of moving&#8230; Please take a look briefly on their Basic Plan, this is amazing: Basic Hosting Plan for only [...]]]></description>
			<content:encoded><![CDATA[<p>Everybody who owns business in the Internet probably sometimes needed a website hosting.<br />
Personally I have two servers by Godaddy.com and glad of it.</p>
<p>But today I&#8217;ve found very-very interesting offer from <a title="Mega Hosting: Basic Plan from Lunarpages" href="http://www.alexfilatov.com/megahosting.html">Lunarpages</a> and started thinking of moving&#8230;</p>
<p>Please take a look briefly on their Basic Plan, this is amazing:</p>
<p><strong>Basic Hosting Plan</strong><br />
for only <strong>$6.95</strong> per month! Ideal for NEW Webmasters!<br />
<strong>350 GB</strong> Storage<br />
<strong>3500 GB</strong> Bandwidth<br />
<em>Free Domain Name for Life!</em><br />
$700 CoffeeCup Software FREE<br />
<strong>10 Add-On</strong> Domains Included</p>
<p><a href="http://www.alexfilatov.com/megahosting.html">View detailed description >></a></p>
<p>My servers costs much more in comparison with this Basic Plan.</p>
<p>Maybe the next post I&#8217;ll write on my new web-server <img src='http://www.alexfilatov.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.alexfilatov.com/2007/05/08/great-offer-for-all-who-own-internet-business/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
