Posts

Showing posts from October, 2010

Rsync is my pal

We have been through many servers. Every time when we decides to change server I had to move them 1 by 1 , file by file, downloading and uploading. And one day I met Rsync. It was really great Rsync can synchronize (Yes I mean it. It just don't copy paste it can sync. It can check newly created edited files and syncs them with new server) files server to server via ssh. Syntax can be found here . And if you are CentOS user like me just yum install rsync.

Installing OS offline

About 2 to 3 years before we had a big server issue. I can't reach Server PC in USA from Mongolia :P. And our server support is unavailable at the time. But I have to install OS on our new server PC. Looked for solution and got Turtle. Not a regular Turtle Atomic Rocket Turtle. With turtle I had successfully installed new OS on my server. So here is the LINK don't forget. And I have very BIG Thank You to Atomic Rocket Turtle. And if you are in condition like me. Just a follow steps THERE

Reflection Script

Have you ever wondered how to make your web pictures look cool? Like reflecting them? And make reflections automatically for all pictures? That can be achieved using script from here . This script is so great all you have to do is add a little script to web page and class to image. And Viola your images will have cool reflect. Btw script is light speed and light weight so don't worry about loading time.

Tab script

You know that every website now has a TAB. Tab can include many information in one page. That is very good idea to place things in one place. So here is the coolest Tab Script . You'll love it. You can change style easily with CSS and it wont conflict with other java scripts. Also it can used more than once in one page. So if you are in pursue of great tab script your journey ends here. I promise

Replacing Blank Lines

Sometimes files got blank lines after line. It may caused from wrong type of transferring. Because of that some scripts won't work. I really doesn't know why. So I had to remove all Blank Lines from file. Of course I've searched through Google. It was already there. But time is money I really don't wont to search over and over again. So I'll post here solution. Open the file Click CTRL + F Select "Current document" in "Find in" (You can also select the folder if you have multiple files) Search in "Source code" Tick "Use regular expression" Type   [\r\n]{2,}    (without quotes) in "Find" Type " \n " (without quotes) in "Replace" Press "Replace All" This will work on Dreamweaver my long time friend. I've forgotten the source. If I find the source someday I'll definitely post here.

Selecting unique data from table

I've been searching for solution like this 2 - 3 days. I've tried array_unique(), mysql_fetch_assoc() none of them worked. It seems this functions only works with single array. But I've found a solution. Was to easy. All I had to do is change the way it selects from database using SELECT DISTINCT. You can see examples from w3 schools by clicking here. So now I can select unique data from table. Today's Lesson is taught. If something wont work try to go ANOTHER WAY. 

This blog will serve me as a memory

I've been through many coding. But after sometimes I can't remember a thing. And have to do that coding solution again and again. The funny thing is after seeing codes that I wrote I wonder who the hell is wrote that code. So I'll post my coding and solution, tricks here. This way I can remember previous coding exp. Also this blog may help some1 that looking for solutions like me. And remember guest if you have solutions and opinions, tips and tricks I'd always love to see your comment. Oh btw sry about my poor English. I'm still learning English. So be soft with my language. And also welcome