Archive | Web Development RSS feed for this section

27 April 2012 1 Comment

Simple javascript string substitution method

My simple and powerful string substitution method like python’s %s and django’s template language. var mystring = “Hello {{ name }} {{ surname }}”; mystring.render({ “name”: “John”, “surname”: “Doe”, }); // “Hello John Doe” To use this method add underscore.js and this short code: String.prototype.render = function(obj) { return _.reduce(_.keys(obj),function(t,k){return t.replace(new RegExp(“\{\{(\ *)”+k+”(\ *)\}\}”,”g”),obj[k])},this.toString()); }; [...]

Tags:
12 October 2011 4 Comments

Ubuntu 11.10 Oneiric Ocelot Gedit 3 Indent Lines Plugin

Here is the “Indent Lines Plugin” that I wrote for gedit3: https://bitbucket.org/serdarakarca/gedit3-plugins   How to use Extract files and move into ~/.local/share/gedit/plugins or /usr/lib/gedit/plugins/ Activate plugin from Edit > Preferences > Plugins > Indent Lines Try Ctrl+t and Ctrl+Shift+t

21 May 2010 17 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, [...]

22 March 2010 1 Comment

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: [...]

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

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 [...]

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 [...]

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 [...]

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 [...]