There is nothing more powerful than an idea.

Except for an idea put into action.

21 May 2010 10 Comments

Lucid Lynx and Gedit “Indent Lines” Plugin

My favourite text editor is gedit. I use gedit because it’s light and very powerful. Unfortunately by lucid upgrade, the indent feature has been removed. Maybe developers thought that tab was enough to indent lines but it is not. So, I want my “Indent Lines” plugin again. And if you want your indent feature back, here is the plugin:

http://yuix.org/wp-content/uploads/2010/05/indent_lines.zip

22 March 2010 0 Comments

Native Multiple File Upload Support by Firefox 3.6

I fed up with Flash Uploaders like Uplodify, YUI Uploader etc. Because any of them works… It doesn’t work and you can’t debug it. Flash plugin is absolutely very painful thing.

At the end, by Firefox 3.6 native multiple file upload suppport has came. I implemented it at Markafoni.com admin panel. Here is an example:

We use Django at backend. Here is Django code to get files:

images = request.FILES.getlist("file[]")
for i in images:
    filename = i.name
    raw_data = i.read()
    ... write raw_data to path/filename ...

If you like php:

foreach ($_FILES['file']['name'] as $filename) {
    echo $filename;
    ... maybe you want to move it anywhere ...
}
18 March 2010 0 Comments

Can’t decide to doctype? It’s easy!

If you think doctype declerations are very long and ugly just use html5 doctype.

<!doctype html>

When I saw this doctype I thought IE would switch to quirks mode. Surprisingly, all major browsers switch to standarts mode with Html5 doctype. All you need is <!doctype html>

12 November 2009 0 Comments

YUI’ye Baslangic: YUI Nasil Kullanilir?


YUI, YAHOO tarafından geliştirilen içerisinde javascript ve css kodları bulunduran gelişmiş bir arayüz kütüphanesidir. Arayüz geliştiricilerinin tüm ihtiyaçlarını karşılayacak kadar zengindir. YUI’nin nasıl kullanıldığını adım adım öğreneceğiz.

Devamını okumak için lütfen tıklayınız…

[...]

10 November 2009 0 Comments

Ubuntu 9.10 ve Vodafone 3G Modem: Huawei E620

3G modemi ilk kez Ubuntu 9.04 te denemiştim ve sonuç mükemmeldi. Hiç bir driver yüklemeden, ilk denemede internete bağlanabilmiştim. Biricik işletim sistemim Ubuntu’ya olan hayranlığım bir kat daha artmıştı. Fakat 9.10′la birlikte ben gibi bir çok Ubuntu kullanıcısı hayal kırıklığına uğradı. 9.10 da 3G modemler USB bellek olarak görünüyor. Modem olarak sisteme bağlanmadığı için internete girmek de mümkün olmuyor. Böylece Microsoft’un Windows işletim sistemleri için hazırlanmış olan bu `kendi driverını yanında taşıyan modem` modeli Ubuntu’nun yoluna taş koymuş oldu.

Yine de Unix’te çareler tükenmez. Aşağıdaki kodları sırayla çalıştırarak Ubuntu 9.10′da da modeminizi internete hazır duruma getirebilirsiniz. Fakat bu kodu çalıştırmadan önce Usb Bellek olarak sisteme bağlanan modemi ‘Safely remove’ etmemiz gerekiyor. Kodları çalıştırdıktan sonra 3G bağlantımız Network Manager’da listelenecektir. Ubuntu takımı bu hatayı düzeltene kadar malesef her açılışta bu hatayı elle düzeltmemiz gerekiyor.

sudo rmmod usb-storage
sudo modprobe -r option
sudo modprobe -r usbserial
sudo modprobe usbserial vendor=0x12d1 product=0x1001
sudo pppd ttyUSB0
10 November 2009 0 Comments

IE7 Bug: On window resize relative positioned elements disappear

If you have relative positioned or floating elements on your page, try to resize your page in IE7, you will see some elements disappear. I also know that sometimes hovering block displayed anchors causes this bug.

Problem is causeing from haslayout property of these elements. If we change haslayout property, the problem is going to be solved. An easy hack of haslayout property is applying “zoom:1″ to elements:

relative_elements_selector {
  zoom:1;
}
9 November 2009 0 Comments

YUI Selector IE8 Bug and Solution

We used YUI 2.5.2 version for a long time on markafoni.com. With the new face of markafoni I decided to update YUI version. I updated YUI to 2.8rc version, but surprisingly I saw javascript errors in all IE8 pages. After googling I found the solution. The problem is was here in selector.js (or selector-min.js):

if(YAHOO.env.ua.ie && YAHOO.env.ua.ie<8)

Change to:

if(YAHOO.env.ua.ie && ((!document.documentMode && YAHOO.env.ua.ie<8) || document.documentMode < 8))
5 November 2009 1 Comment

Thinkpad SL500 Ubuntu Drivers

I recently bought a new Thinkpad SL500. I installed a fresh Ubuntu 9.10. Unfortunately media keys and bluetooth was not working. After googling I found an experimental driver for media keys and bluetooth.

Here is the solution; first download driver from http://github.com/tetromino/lenovo-sl-laptop

After unpacking it. Run commands in the folder:

make all
sudo cp lenovo-sl-laptop.ko /lib/modules/`uname -r`/kernel/drivers/misc
sudo depmod
sudo modprobe lenovo-sl-laptop
5 November 2009 0 Comments

Easy way of mounting remote media/folders with sshfs

Using ssh’s power it is very easy to mount remote folders. All you need to install sshfs package. It exist in the repository of Ubuntu. Don’t forget to add your user to Fuse group.

Step 1.

Install sshfs:

sudo apt-get install sshfs

Step 2.

Go to Ubuntu’s System -> Administrator -> Users and Groups

Add your user to fuse group.

Now you’re ready to mount remote folders. For example:

sshfs root@remoteip:/remote_path /home/user/Desktop/mnt
19 October 2009 1 Comment

ProcessingJs ve HTML5 Canvas

Web’de animasyon yapmak hiç bu kadar kolay olmamıştı. HTML5 bir gün tüm browserlar tarafından desteklenir olduğunda, basit animasyonlar yaratmak için herhangi bir araca gerek duymayacağız. Processing ve Processingjs sayesinde, HTML5 canvas üzerinde animasyon oluşturmak için bir kaç satır kod yazmak yeterli oluyor.

Okul projemi processing’de yazdıktan sonra örnek olarak bloguma da yazmaya karar verdim. Bu animasyon Internet Explorer haricindeki browserlarda görünecektir.