~ overflow ~

Archive for May, 2008

An old CSS Trick

by z3n on May.30, 2008, under Tips & Hints

It’s been a long time i use this trick but i never got time to share it, so here it goes,

there are many different ways to have an specific css command to be interpreted by a IE or FF, but they are complicated some are obscure , other requires you to do a separated CSS file etc etc

here’s my trick:

.someclass {
width:250px; /* this is for FF */
//width:265px; /* this only works on IE */
}

so on FF it will ignore the commented line while IE will override the previous value with the one on the commented line; For some reason this works all IE versions i was able to test, somehow IE really loves to read the //’s , regular /* */ comments are ignored by both browsers.

that’s all.

Leave a Comment :, , more...

Javascript Base64 -> PHP -> MySQL Issue

by z3n on May.21, 2008, under Tips & Hints

You might be wondering why someone would send encoded data to php to be inserted on a table, just think that you need to put a html into a table, how many issues you can fall into? it’s much easier encode it, so then you fall into a different issue…

i’m using a regular base64 encode/decoder script wich you can find by searching google “javascript base64″;

the problem is that once you send the base64 data to php by POST or GET it gets corrupted! why this happens? cuz life sucks?!

so i figured out a interesting thing

base64 uses the character “+” wich is the same character to determine spaces on the POST/GET data, so basically when you send information by a form it will be sent like this:

“bleh bleh bleh” -> “bleh+bleh+bleh” when php gets it it will convert back to the original string (replacing the “+”’s with ” ” (space)) that made the javascript base64’s encoded information to get corrupted, just like this:

original base64 encode:

PGh0bWw+PGhlYWQ+PHRpdGxlPl

after sending to php it will be added as this on the database:

PGh0bWw PGhlYWQ PHRpdGxlPl

so to fix this issue, you just need a str_replace(" ","+",$base64_data_from_javascript) to fix it.

that’s all.

Leave a Comment :, , more...

Removing GRUB

by z3n on May.16, 2008, under Tips & Hints

I have dual boot, one disk got windows and the other fedora, however my fedora disk died of crappyness, so now i got stuck outside both OS since GRUB won’t run if the unix disk isen’t online and simply locks up you.

So i figured out that GRUB stays on the MBR and all you have to do is erase it from there, so to do this you need your windows install cd, boot using it and after loading go on Repair, type FIXMBR then FIXBOOT and you’re done.

Leave a Comment :, more...

Remote Desktop from Windows to Linux ?

by z3n on May.15, 2008, under Linux Happyness

So, i heard it’s possible (of course it’s possible lol) and i wanted to test. I have a dedicated server running Fedora, but without any GUI, so first i had to install some graphic interfaces (you can’t Remote Desktop when all you got is a shiny prompt), so that’s how you do it on fedora:

first:

from some random site on the web:

“Since the OLPC images are quite stripped due to the 512MB requirement, you may wish to install additional software. Before installing either a Gnome or KDE environment, you must resolve a conflict between Sugar’s artwork package, and the normal Fedora artwork package.”

so you have to install this before installing gnome:

yum install redhat-artwork

then you install the gnome by:

yum install nautilus gedit gdm gnome-panel gnome-session

it’s a long ass process that might lead you into slow mirrors and lots of pain, but at nothing more than this :P — please note that you only need to install this if you don’t have gnome or any other GUI installed.

So, now you need a program to view the desktop, since i did a search on google and found some results for it, basically you can either use the old and known RealVNC or those ticky programs like XManager3.

The problem with RealVNC is that theorically you would need to run it when you are already inside the GUI, however how you do that if you can’t get into the GUI remotelly? oh bite me, i forgot to meantion that the server i’m dealing with is remote and i don’t have direct console access to it ? :P

Soooo, i got this crappy XManager 3 program installed on my windows box, and using the XStart i connected thorought SSH to my server and loaded GNOME on it!……. so i got waiting for like 5 minutes until the whole thing gets loaded, since it’s pretty slow, recalls me of 56k times.

So far i’m not installing RealVNC to see if it works faster, just wanted to try this remote desktop on linux, it’s slow but it works.

i still prefeer the old prompt, but if you got be into a shiny interface, maybe just to open that little torrent program (that only works with GUI) to download lots of p0rn, you might need to install a GUI.

;)

Leave a Comment :, , , more...

Hello world!

by admin on May.15, 2008, under Uncategorized

w00000000t

welcome to the blog

i don’t have much time so i’m not writing a cool custom shiny message.

Leave a Comment more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!