<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title>the DtTvB's Old Blog</title>
	<link href="http://dt.in.th/" type="text/html" />
	<link rel="self" href="http://dt.in.th/atom.php" />
	<author><name>the DtTvB</name></author>
	<id>http://dt.in.th/</id>
	<updated>2009-02-21T11:04:00Z</updated>
	<entry>
		<title>Move!</title>
		<published>2009-02-21T11:04:00Z</published>
		<updated>2009-02-21T11:04:00Z</updated>
		<author><name>the DtTvB</name></author>
		<id>http://dt.in.th/2009-02-21.move.html</id>
		<link href="http://dt.in.th/2009-02-21.move.html" />
		<content type="html" xml:base="http://dt.in.th/">
			&lt;p&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://dttvb.com/&quot; style=&quot;font-size:40pt&quot;&gt;dttvb.com&lt;/a&gt;
&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;

		</content>
	</entry>
	<entry>
		<title>Too Tired To Code? Again?</title>
		<published>2009-01-09T15:13:00Z</published>
		<updated>2009-01-09T15:13:00Z</updated>
		<author><name>the DtTvB</name></author>
		<id>http://dt.in.th/2009-01-09.too-tired-to-code-again.html</id>
		<link href="http://dt.in.th/2009-01-09.too-tired-to-code-again.html" />
		<content type="html" xml:base="http://dt.in.th/">
			&lt;p&gt;My friends are going to English camp, while I stay home...&lt;/p&gt;

&lt;p&gt;In fact, there will be a &quot;Kids Day Party&quot; at my village tomorrow, and there will be a &quot;New Year Party&quot; at my cousin's house.... So that's why I cannot go to the English camp....&lt;/p&gt;

&lt;p&gt;On the day that my friends go to camp, I help my friends mixing all the together and put them in one file... I have also made an intro music that blends with the first music together, and I record my voice, being a narration sound....&lt;/p&gt;

&lt;p&gt;I thought that I can do a lot of things in these 4 days while my friends have fun at English camp.&lt;/p&gt;

&lt;p&gt;No. Laziness owned me again. :'(&lt;/p&gt;

&lt;p&gt;Coding takes energy, but making music takes more that that.&lt;/p&gt;

&lt;p&gt;In fact, learning at the school takes the most energy from me so I cannot code these days. I only wish I get well soon. &lt;/p&gt;

&lt;p&gt;For now all I can do is surfing the internet, chatting and posting on forums.&lt;/p&gt;

&lt;p&gt;I will get well soon!&lt;/p&gt;

		</content>
	</entry>
	<entry>
		<title>Happy New Year</title>
		<published>2008-12-31T17:00:00Z</published>
		<updated>2008-12-31T17:00:00Z</updated>
		<author><name>the DtTvB</name></author>
		<id>http://dt.in.th/2009-01-01.hny.html</id>
		<link href="http://dt.in.th/2009-01-01.hny.html" />
		<content type="html" xml:base="http://dt.in.th/">
			&lt;p&gt;2009&lt;/p&gt;

		</content>
	</entry>
	<entry>
		<title>a.dt.in.th Downtime This New Year</title>
		<published>2008-12-30T17:27:00Z</published>
		<updated>2008-12-30T17:27:00Z</updated>
		<author><name>the DtTvB</name></author>
		<id>http://dt.in.th/2008-12-31.a-dt-in-th-downtime-this-new-year.html</id>
		<link href="http://dt.in.th/2008-12-31.a-dt-in-th-downtime-this-new-year.html" />
		<content type="html" xml:base="http://dt.in.th/">
			&lt;p&gt;This new year I will be putting a.dt.in.th (my home server) down for 3 to 4 days. Any link that links to a.dt.in.th or dttvb.yi.org will not work.&lt;/p&gt;

		</content>
	</entry>
	<entry>
		<title>Your QR Code Reader Should Be Able To Decode This</title>
		<published>2008-12-25T10:14:00Z</published>
		<updated>2008-12-25T10:14:00Z</updated>
		<author><name>the DtTvB</name></author>
		<id>http://dt.in.th/2008-12-25.qrcode.html</id>
		<link href="http://dt.in.th/2008-12-25.qrcode.html" />
		<content type="html" xml:base="http://dt.in.th/">
			&lt;p&gt;If the QR code reader can not decode this, it sucks, and you should change your reader.&lt;/p&gt;

&lt;p&gt;The results should be like text red text in the middle of this picture.&lt;/p&gt;

&lt;p&gt;I used kaywa's reader and it can decode this very well!&lt;/p&gt;

&lt;p&gt;&lt;img alt=&quot;description&quot; src=&quot;./images/kcfggr-qr-test.png&quot; /&gt;&lt;/p&gt;

		</content>
	</entry>
	<entry>
		<title>NLC 9 Photos (Done)</title>
		<published>2008-12-16T15:05:00Z</published>
		<updated>2008-12-16T15:05:00Z</updated>
		<author><name>the DtTvB</name></author>
		<id>http://dt.in.th/2008-12-16.nlc-live-blog.html</id>
		<link href="http://dt.in.th/2008-12-16.nlc-live-blog.html" />
		<content type="html" xml:base="http://dt.in.th/">
			&lt;script type=&quot;text/javascript&quot;&gt;
document.write ('&lt;iframe width=&quot;99%&quot; height=&quot;140&quot; frameborder=&quot;0&quot; allowtransparency=&quot;true&quot; src=&quot;http://www.dttvb.com/cdn/nlc_pg.html&quot;&gt;Please enable IFRAME!&lt;/iframe&gt;&lt;iframe width=&quot;99%&quot; height=&quot;100&quot; frameborder=&quot;0&quot; allowtransparency=&quot;true&quot; src=&quot;http://www.dttvb.com/cdn/nlc_tp.html&quot;&gt;Please enable IFRAME!&lt;/iframe&gt;');
&lt;/script&gt;

		</content>
	</entry>
	<entry>
		<title>Color Blender</title>
		<published>2008-12-14T14:23:00Z</published>
		<updated>2008-12-14T14:23:00Z</updated>
		<author><name>the DtTvB</name></author>
		<id>http://dt.in.th/2008-12-14.dtblend.html</id>
		<link href="http://dt.in.th/2008-12-14.dtblend.html" />
		<content type="html" xml:base="http://dt.in.th/">
			&lt;p&gt;Just an experiment about color.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.dttvb.com/cdn/dtblend.html&quot; &gt;dtblend&lt;/a&gt; is a simple HTML page that allows users to pick a color in a strange way.... By mixing primary colors!&lt;/p&gt;

&lt;p&gt;The script is licenced as creative commons so you are free to use it as long as you attribute me.&lt;/p&gt;

&lt;p&gt;For example: I mixed cyan and magenta to create purple.&lt;/p&gt;

&lt;p&gt;&lt;img alt=&quot;description&quot; src=&quot;./images/kbvf2t-purpl.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;See &lt;a href=&quot;http://www.dttvb.com/cdn/dtblend.html&quot; &gt;dtblend in action&lt;/a&gt;!&lt;/p&gt;

		</content>
	</entry>
	<entry>
		<title>FASTERRRR!!</title>
		<published>2008-12-12T14:40:00Z</published>
		<updated>2008-12-12T14:40:00Z</updated>
		<author><name>the DtTvB</name></author>
		<id>http://dt.in.th/2008-12-12.fasterrrr.html</id>
		<link href="http://dt.in.th/2008-12-12.fasterrrr.html" />
		<content type="html" xml:base="http://dt.in.th/">
			&lt;p&gt;I have used Ubuntu for more than 2 years already but I have installed Ubuntu on my PC last time just 10 months ago.&lt;/p&gt;

&lt;p&gt;Everything works well.... but &lt;strong&gt;as the time goes it gets slower!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That's a big problem for me... It takes 179 seconds to render ~8000 div in Firefox. Each time I open a web page I need to wait for 2 seconds until it responds.&lt;/p&gt;

&lt;p&gt;I have set up a guest user a long time ago. Last week I tried logging in to Guest user, and &lt;strong&gt;it works really fast!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;There must be something that slows down my desktop.&lt;/p&gt;

&lt;p&gt;Today, I decided to reset my GNOME desktop. I have done a lot of settings to it... and I don't ever use them! I have a bunch of icons on the gnome panel and I never use them!&lt;/p&gt;

&lt;p&gt;I think I will reset my gnome desktop.&lt;/p&gt;

&lt;p&gt;Ok, after I reset my gnome desktop, everything works faster, everything looks like a new installation of Ubuntu. I get the original Ubuntu wallpaper and the human look. Everything in the gnome-panel is also gone.&lt;/p&gt;

&lt;p&gt;Only one exception, I see the old desktop icons...&lt;/p&gt;

&lt;p&gt;I tried running the benchmark again... From 179 seconds, it drops to... 6 seconds!&lt;/p&gt;

&lt;p&gt;What the funny! It's very fast.&lt;/p&gt;

&lt;p&gt;If you are in my situation and you want to reset your gnome desktop, just follow the steps.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Switch to your console by hitting &lt;strong&gt;ctrl+alt+f2&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Stop GDM... &lt;code&gt;/etc/init.d/gdm stop&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Kill the funny gconf daemon &lt;code&gt;sudo killall gconfd-2&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Make a settings backup &lt;code&gt;mkdir settingsbackup&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Move old settings there. &lt;code&gt;mv .gnome .gnome2 .gconf .gconfd .metacity settingsbackup&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Reboot once &lt;code&gt;sudo reboot&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Yay!&lt;/li&gt;
&lt;/ol&gt;

		</content>
	</entry>
	<entry>
		<title>Taking Screenshots in Linux while preserving the transparency.</title>
		<published>2008-11-30T05:27:00Z</published>
		<updated>2008-11-30T05:27:00Z</updated>
		<author><name>the DtTvB</name></author>
		<id>http://dt.in.th/2008-11-30.linux-transparent-screenshot.html</id>
		<link href="http://dt.in.th/2008-11-30.linux-transparent-screenshot.html" />
		<content type="html" xml:base="http://dt.in.th/">
			&lt;p&gt;&lt;strong&gt;Obsolete! See &lt;a href=&quot;http://dttvb.com/abscapture.html&quot; &gt;abscapture&lt;/a&gt; for a newer version. It's easier and much faster!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;img alt=&quot;Example Screenshot&quot; src=&quot;./images/kb4s8x-alphablending.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;See the gallery:&lt;/strong&gt; (Does not work in IE6!) You can use the scrollbar to move the image around. The background's fixed so you can easily see the transparency.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://www.dttvb.com/cdn/alphatest/index.html?cairodock&quot; &gt;Cairo Dock&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.dttvb.com/cdn/alphatest/index.html?flip&quot; &gt;Shift Switcher&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.dttvb.com/cdn/alphatest/index.html?blur&quot; &gt;Blur Plugin&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I really like the ability to capture a screenshot of a window, while preseving the transparency of that window in Mac and Windows.&lt;/p&gt;

&lt;p&gt;On a Mac you would just press Command+Shift+4 and then press space, then click on a window you want to capture. It will place an image of your window on your desktop. The window's shadow and its transparency is preserved. You will get a nice PNG screenshot of the selected window.&lt;/p&gt;

&lt;p&gt;On Windows, you can use Window Clippings. It's really nice.&lt;/p&gt;

&lt;p&gt;What about on Linux?&lt;/p&gt;

&lt;p&gt;I have tried searching, but I couldn't find any application that does this, so I made my own.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Warning:&lt;/strong&gt; I suck at python! The script below is written in Python, but trust me, I suck at python.&lt;/p&gt;

&lt;p&gt;Ok, first, please &lt;a href=&quot;/src/alphablender.tar.gz&quot; &gt;grab my script&lt;/a&gt; [1kb] and place it in a new folder in your home directory. You also need to install scrot for it to take screenshots.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Warning:&lt;/strong&gt; I really suck at python.&lt;/p&gt;

&lt;h2&gt;Taking the screenshot.&lt;/h2&gt;

&lt;p&gt;The screenshot you are going to take must be static, meaning if there is something moving while the screenshot is being taken, it will mess up the screenshot. Now, prepare your screenshot. Arrange all windows in the place you need, minimize everything except the window you want to be included. Are you ready to take your screenshot?&lt;/p&gt;

&lt;p&gt;Now, open a terminal, and then cd to the place you extracted your files, then type this.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;python dtbwc
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;You can now minimize the terminal. You will see a fullscreen window, replacing your desktop, with one big button on the center.&lt;/p&gt;

&lt;p&gt;After you click the button, the window background will start fading from white to black,
then you will have 15 seconds set up the scene, open the menu, move your mouse over something to highlight, while keeping that fullscreen window as the background.&lt;/p&gt;

&lt;p&gt;In the last second, stand still, don't move your mouse. Your screen will flash once, and your computer will beep twice, then the application will return your desktop back. Ok, got that already? Now run the above command.&lt;/p&gt;

&lt;p&gt;Doesn't look quite right? You can try again and again for an unlimited time!&lt;/p&gt;

&lt;p&gt;Now you should see the file &lt;code&gt;onblack.png&lt;/code&gt; and &lt;code&gt;onwhite.png&lt;/code&gt; in that directory. &lt;code&gt;onblack.png&lt;/code&gt; is your screenshot on black background, and &lt;code&gt;onwhite.png&lt;/code&gt; is your screenshot on white background.&lt;/p&gt;

&lt;h2&gt;Taking the screenshot manually.&lt;/h2&gt;

&lt;p&gt;If you want to capture some icons on the desktop, or want to do it manually, change your desktop wallpaper to black, and press Print Screen. Save the screenshot as &lt;code&gt;onblack.png&lt;/code&gt; in the script directory.&lt;/p&gt;

&lt;p&gt;Now change your screenshot to white, and take the screenshot, and save them as &lt;code&gt;onwhite.png&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;These 2 files must be in the same place as the script!&lt;/p&gt;

&lt;h2&gt;Merge the screenshots.&lt;/h2&gt;

&lt;p&gt;It took me more than 4 hours until I can figure out an algorithm for this! You can look at the algorithm I used in the &quot;blend&quot; script.&lt;/p&gt;

&lt;p&gt;Now that you have &lt;code&gt;onblack.png&lt;/code&gt; and &lt;code&gt;onwhite.png&lt;/code&gt; already. Now type in:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;python blend
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This will merge two screenshots together and make &lt;code&gt;result.png&lt;/code&gt;. The blend script will take about ~30 seconds to merge two screenshots together.. After the script returns, enjoy result.png!&lt;/p&gt;

&lt;p&gt;You can now use GIMP to crop the result, or modify the picture... Finally, save the result.png with different file name.&lt;/p&gt;

&lt;h2&gt;Make it better!&lt;/h2&gt;

&lt;p&gt;If you are good at python, please improve this script (make the blend script faster) or make a better script to do this.&lt;/p&gt;

&lt;p&gt;Enjoy this article and don't forget to comment! :)&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://digg.com/linux_unix/Taking_Screenshots_in_Linux_preserving_the_transparency&quot; &gt;Digg It&lt;/a&gt; ;)&lt;/p&gt;

		</content>
	</entry>
	<entry>
		<title>Busy</title>
		<published>2008-11-22T14:11:00Z</published>
		<updated>2008-11-22T14:11:00Z</updated>
		<author><name>the DtTvB</name></author>
		<id>http://dt.in.th/2008-11-22.post-tag.html</id>
		<link href="http://dt.in.th/2008-11-22.post-tag.html" />
		<content type="html" xml:base="http://dt.in.th/">
			&lt;p&gt;I have been so busy.&lt;/p&gt;

&lt;p&gt;Just saying that I am still alive.&lt;/p&gt;

&lt;p&gt;When I have time I will post. :)&lt;/p&gt;

		</content>
	</entry>
</feed>