<?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/"
	>

<channel>
	<title>Snippets</title>
	<atom:link href="http://www.zydecode.net/snippets/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.zydecode.net/snippets</link>
	<description>Snippets</description>
	<pubDate>Mon, 28 Apr 2008 20:14:28 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Launch Flex in same Firefox window</title>
		<link>http://www.zydecode.net/snippets/?p=41</link>
		<comments>http://www.zydecode.net/snippets/?p=41#comments</comments>
		<pubDate>Mon, 23 Apr 2007 14:03:56 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
		
		<category><![CDATA[ActionScript]]></category>

		<guid isPermaLink="false">http://www.zydecode.net/snippets/?p=41</guid>
		<description><![CDATA[about:config >> browser.link.open_external >> set to 1
]]></description>
			<content:encoded><![CDATA[<p>about:config >> browser.link.open_external >> set to 1</p>
]]></content:encoded>
			<wfw:commentRss>http://www.zydecode.net/snippets/?feed=rss2&amp;p=41</wfw:commentRss>
		</item>
		<item>
		<title>PNG2SWF batch file</title>
		<link>http://www.zydecode.net/snippets/?p=40</link>
		<comments>http://www.zydecode.net/snippets/?p=40#comments</comments>
		<pubDate>Wed, 18 Oct 2006 14:41:01 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
		
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://zydecode.net/snippets/index.php?p=40</guid>
		<description><![CDATA[Option Explicit
&#160;
Dim fso: Set fso = CreateObject("Scripting.FileSystemObject")
Dim CurrentFolder: Set CurrentFolder = fso.GetFolder(".\png")
Dim WShell: Set WShell = WScript.CreateObject("WScript.Shell")
&#160;
Dim Files: Set Files = CurrentFolder.Files
Dim File
Dim fileName
Dim objFile
Dim str
&#160;
For Each File In Files
    Set objFile = fso.GetFile(File)
    fileName = fso.GetBaseName(objFile)
  &#160;
    str = "C:\progra~1\swftools\png2swf.exe -X 540 -Y 360 [...]]]></description>
			<content:encoded><![CDATA[<p><code>Option Explicit<br />
&nbsp;<br />
Dim fso: Set fso = CreateObject("Scripting.FileSystemObject")<br />
Dim CurrentFolder: Set CurrentFolder = fso.GetFolder(".\png")<br />
Dim WShell: Set WShell = WScript.CreateObject("WScript.Shell")<br />
&nbsp;<br />
Dim Files: Set Files = CurrentFolder.Files<br />
Dim File<br />
Dim fileName<br />
Dim objFile<br />
Dim str<br />
&nbsp;<br />
For Each File In Files<br />
    Set objFile = fso.GetFile(File)<br />
    fileName = fso.GetBaseName(objFile)<br />
  &nbsp;<br />
    str = "C:\progra~1\swftools\png2swf.exe -X 540 -Y 360 -o E:\path\to\swf\" &#038; fileName &#038; ".swf -r 30 E:\path\to\png\" &#038; fileName &#038; ".png"<br />
 &nbsp;<br />
    WShell.Run str, 0<br />
   &nbsp;<br />
Next<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.zydecode.net/snippets/?feed=rss2&amp;p=40</wfw:commentRss>
		</item>
		<item>
		<title>phpMyAdmin CSS/theme not displayed</title>
		<link>http://www.zydecode.net/snippets/?p=39</link>
		<comments>http://www.zydecode.net/snippets/?p=39#comments</comments>
		<pubDate>Thu, 05 Oct 2006 02:27:32 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
		
		<category><![CDATA[Apache]]></category>

		<category><![CDATA[PHP]]></category>

		<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://zydecode.net/snippets/index.php?p=39</guid>
		<description><![CDATA[This little bug is a pain, but luckily only shows up on certain configs&#8230;
So far, it seems to be an issue that only surfaces with Apache2.0 and PHP5, on Windows.. and is caused by the chdir(..) call - the main one being phpmyadmin.css.php. Change the &#8220;..&#8221; to your root directory, and all should be solved.
BTW [...]]]></description>
			<content:encoded><![CDATA[<p>This little bug is a pain, but luckily only shows up on certain configs&#8230;</p>
<p>So far, it seems to be an issue that only surfaces with Apache2.0 and PHP5, on Windows.. and is caused by the chdir(..) call - the main one being phpmyadmin.css.php. Change the &#8220;..&#8221; to your root directory, and all should be solved.</p>
<p>BTW - it has nothing to do with ./ syntax being used in phpMyAdmin.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.zydecode.net/snippets/?feed=rss2&amp;p=39</wfw:commentRss>
		</item>
		<item>
		<title>find text within a BSD file</title>
		<link>http://www.zydecode.net/snippets/?p=38</link>
		<comments>http://www.zydecode.net/snippets/?p=38#comments</comments>
		<pubDate>Fri, 29 Sep 2006 21:12:49 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
		
		<category><![CDATA[freeBSD]]></category>

		<guid isPermaLink="false">http://zydecode.net/snippets/index.php?p=38</guid>
		<description><![CDATA[find / -iname &#8220;*.conf&#8221; -print0 &#124; xargs -0 grep &#8220;the text you need to find&#8221;
]]></description>
			<content:encoded><![CDATA[<p>find / -iname &#8220;*.conf&#8221; -print0 | xargs -0 grep &#8220;the text you need to find&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.zydecode.net/snippets/?feed=rss2&amp;p=38</wfw:commentRss>
		</item>
		<item>
		<title>Apache MSI installer</title>
		<link>http://www.zydecode.net/snippets/?p=37</link>
		<comments>http://www.zydecode.net/snippets/?p=37#comments</comments>
		<pubDate>Thu, 21 Sep 2006 18:35:44 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
		
		<category><![CDATA[Apache]]></category>

		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://zydecode.net/snippets/index.php?p=37</guid>
		<description><![CDATA[if the installer just bails on the initial screen, make sure that the computer has a domain set up in the networking dialog. This is used to auto-configure the install of Apache, and looks like there is no detection other than failure during the installation process.
]]></description>
			<content:encoded><![CDATA[<p>if the installer just bails on the initial screen, make sure that the computer has a domain set up in the networking dialog. This is used to auto-configure the install of Apache, and looks like there is no detection other than failure during the installation process.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.zydecode.net/snippets/?feed=rss2&amp;p=37</wfw:commentRss>
		</item>
		<item>
		<title>Scanning workflow</title>
		<link>http://www.zydecode.net/snippets/?p=36</link>
		<comments>http://www.zydecode.net/snippets/?p=36#comments</comments>
		<pubDate>Wed, 20 Sep 2006 16:45:13 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
		
		<category><![CDATA[Photoshop]]></category>

		<guid isPermaLink="false">http://zydecode.net/snippets/index.php?p=36</guid>
		<description><![CDATA[for 645 on ArtixScan 120tf, Silverfast Ai

48 bit Color, fit levels to ends of curve. 
NO colour correction, NO sharpening.
Scale 1000%, 228 DPI

In Photoshop:
Shadow/Highlights, tweak shadows for radius. Color balance - add yellow
]]></description>
			<content:encoded><![CDATA[<p>for 645 on ArtixScan 120tf, Silverfast Ai</p>
<ul>
<li>48 bit Color, fit levels to ends of curve. </li>
<li>NO colour correction, NO sharpening.</li>
<li>Scale 1000%, 228 DPI</li>
</ul>
<p>In Photoshop:<br />
Shadow/Highlights, tweak shadows for radius. Color balance - add yellow</p>
]]></content:encoded>
			<wfw:commentRss>http://www.zydecode.net/snippets/?feed=rss2&amp;p=36</wfw:commentRss>
		</item>
		<item>
		<title>php5 on FreeBSD 6.1</title>
		<link>http://www.zydecode.net/snippets/?p=35</link>
		<comments>http://www.zydecode.net/snippets/?p=35#comments</comments>
		<pubDate>Mon, 11 Sep 2006 16:54:43 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
		
		<category><![CDATA[freeBSD]]></category>

		<guid isPermaLink="false">http://zydecode.net/snippets/index.php?p=35</guid>
		<description><![CDATA[After downloading the 6.1 version php5 port config files you have to do &#8220;make config&#8221; and select the apache module. The &#8220;make install&#8221; will automatically make the correct changes to your httpd-config file for serving up php pages correctly. php5-extensions is not normally needed.
]]></description>
			<content:encoded><![CDATA[<p>After downloading the 6.1 version php5 port config files you have to do &#8220;make config&#8221; and select the apache module. The &#8220;make install&#8221; will automatically make the correct changes to your httpd-config file for serving up php pages correctly. php5-extensions is not normally needed.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.zydecode.net/snippets/?feed=rss2&amp;p=35</wfw:commentRss>
		</item>
		<item>
		<title>FTP script for Windows batch file</title>
		<link>http://www.zydecode.net/snippets/?p=33</link>
		<comments>http://www.zydecode.net/snippets/?p=33#comments</comments>
		<pubDate>Sat, 05 Aug 2006 16:36:22 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
		
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://zydecode.net/snippets/index.php?p=33</guid>
		<description><![CDATA[REM set file name by today's date - %ftpFile% format will be "FTP-2004-03-25.txt" SetLocal
FOR /F "tokens=2-4 delims=/ " %%i in ('DATE/T') do SET ftpStr=FTP-%%k-%%i-%%j
echo %ftpFile% if NOT exist C:\FTP\%ftpStr% EXIT
(echo open 10.0.9.5
echo ftp_user
echo ftp_password
echo put C:\FTP\%ftpStr%.txt inbound/%ftpStr%.txt
echo quit)>myFTP.txt ftp -s:myFTP.txt del myFTP.txt echo %ftpStr%.txt uploaded: %Date% %Time%>>ftp.log
exit

]]></description>
			<content:encoded><![CDATA[<p><code>REM set file name by today's date - %ftpFile% format will be "FTP-2004-03-25.txt" SetLocal<br />
FOR /F "tokens=2-4 delims=/ " %%i in ('DATE/T') do SET ftpStr=FTP-%%k-%%i-%%j<br />
echo %ftpFile% if NOT exist C:\FTP\%ftpStr% EXIT<br />
(echo open 10.0.9.5<br />
echo ftp_user<br />
echo ftp_password<br />
echo put C:\FTP\%ftpStr%.txt inbound/%ftpStr%.txt<br />
echo quit)>myFTP.txt ftp -s:myFTP.txt del myFTP.txt echo %ftpStr%.txt uploaded: %Date% %Time%>>ftp.log<br />
exit<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.zydecode.net/snippets/?feed=rss2&amp;p=33</wfw:commentRss>
		</item>
		<item>
		<title>Wordpress on IIS</title>
		<link>http://www.zydecode.net/snippets/?p=32</link>
		<comments>http://www.zydecode.net/snippets/?p=32#comments</comments>
		<pubDate>Sat, 05 Aug 2006 15:52:21 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
		
		<category><![CDATA[PHP]]></category>

		<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://zydecode.net/snippets/index.php?p=32</guid>
		<description><![CDATA[
replace /? with /index.php?
replace ?cat with index.php?cat
function wpautop($pee, $br = 1) : set 1 to 0

]]></description>
			<content:encoded><![CDATA[<ul>
<li>replace /? with /index.php?</li>
<li>replace ?cat with index.php?cat</li>
<li>function wpautop($pee, $br = 1) : set 1 to 0</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.zydecode.net/snippets/?feed=rss2&amp;p=32</wfw:commentRss>
		</item>
		<item>
		<title>CF database schema dump</title>
		<link>http://www.zydecode.net/snippets/?p=31</link>
		<comments>http://www.zydecode.net/snippets/?p=31#comments</comments>
		<pubDate>Fri, 21 Jul 2006 02:30:55 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
		
		<category><![CDATA[ColdFusion]]></category>

		<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://zydecode.net/snippets/index.php?p=31</guid>
		<description><![CDATA[needed to get a dump of an old database schema via Cold Fusion:

  SELECT *
  FROM Information_Schema.Tables
  ORDER BY Table_Name


  
    SELECT COLUMN_NAME, DATA_TYPE, CHARACTER_MAXIMUM_LENGTH
    FROM Information_Schema.Columns
    WHERE Table_Name = &#8216;#Table_Name#&#8217;
    ORDER BY Ordinal_Position
  
  
  [...]]]></description>
			<content:encoded><![CDATA[<p>needed to get a dump of an old database schema via Cold Fusion:</p>
<p><code><cfquery name="GetTableNames" datasource="theDB"></p>
<p>  SELECT *<br />
  FROM Information_Schema.Tables<br />
  ORDER BY Table_Name</p>
<p></cfquery></p>
<p><cfloop query="GetTableNames"></p>
<p>  <cfquery name="GetColumns" datasource="theDB"></p>
<p>    SELECT COLUMN_NAME, DATA_TYPE, CHARACTER_MAXIMUM_LENGTH<br />
    FROM Information_Schema.Columns<br />
    WHERE Table_Name = &#8216;#Table_Name#&#8217;</p>
<p>    ORDER BY Ordinal_Position</p>
<p>  </cfquery></p>
<p>  <cfdump var="#Table_Name#"><br />
  <cfdump var="#GetColumns#"></p>
<p></cfloop><br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.zydecode.net/snippets/?feed=rss2&amp;p=31</wfw:commentRss>
		</item>
	</channel>
</rss>
