CSS Sticky Footer + BlueprintCSS

11 08 2009

I got the basic of sticky footer from cssstickyfooter.com and here is my sticky footer combining with blueprintcss.

The HTML code:

<html>
<head>...</head>
<body>
	<div class="container">
		...
	</div>
	<div id="stickyfooter">
		Here you go your fancy sticky footer..
	</div>
</body>
</html>

The CSS:
(I add these lines in screen.css)

/** for sticky footer */
body {margin:0}
html, body {height: 100%;}
.container {height: 100%;}
#stickyfooter {
	position:relative;
	height: 150px;
	margin-top: -150px; /* must be the same value as height */
	clear:both;
	text-align:center; /* up to you */
	background:#ff0; /* up to you */
}

The height of the footer is sets by “height” and “margin-top” in “#stickyfooter”.

Please note that I’m not tested it yet in other browsers but firefox 3.5.1 (Shiretoko) in Ubuntu 9.04. Please feel free to drop me some comments.

Advertisements




PHP Cookies on IE6

3 08 2009

Source: http://www.oreillynet.com/mac/blog/2002/06/p3p_in_ie6_frustrating_failure.html

“MSIE 6 has an inaccurate definition of third party cookies. If your domain is hosted on one server and your PHP stuff is on another, the IE6 P3P implementation considers any cookies sent from the second machine “third party”. Third party cookies will be blocked automatically in most privacy settings if not accompanied by what MS considers “an appropriate Compact Policy”. In order to make this new piece of tweakable garbage happy I’d suggest you’d par exemple send

header(’P3P: CP=”NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM”‘);





PHP SoapServer

4 02 2009

Methods:
Array
(
[0] => SoapServer
[1] => setPersistence
[2] => setClass
[3] => setObject
[4] => addFunction
[5] => getFunctions
[6] => handle
[7] => fault
[8] => addSoapHeader
)





PostgreSQL

25 07 2008

This post is about postgresql commands and other stuffs about it. It will updated when I update it. :))

Change PosgreSQL postgres user password

sudo -u postgres psql postgres
postgres=# ALTER USER postgres WITH ENCRYPTED PASSWORD 'a';
ALTER ROLE
postgres=# \q

Create a database with a user that have full rights on the database:

sudo -u postgres createuser -D -A -P myuser
sudo -u postgres createdb -O myuser mydb




Export Database Of Oracle XE 10.x On Ubuntu Linux

22 07 2008
oracle@bianca:~$ export ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/
oracle@bianca:~$ /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/exp angelina@bianca

Export: Release 10.2.0.1.0 - Production on Wed Jul 23 04:47:59 2008

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Password:

Connected to: Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
Enter array fetch buffer size: 4096 >

Export file: expdat.dmp > alectra-dev-20080723.dmp

(1)E(ntire database), (2)U(sers), or (3)T(ables): (2)U >

Export grants (yes/no): yes > no

Export table data (yes/no): yes >

Compress extents (yes/no): yes >

Export done in US7ASCII character set and AL16UTF16 NCHAR character set
server uses AL32UTF8 character set (possible charset conversion)
Note: grants on tables/views/sequences/roles will not be exported

About to export specified users ...
User to be exported: (RETURN to quit) > alectra

User to be exported: (RETURN to quit) >

. exporting pre-schema procedural objects and actions
. exporting foreign function library names for user ALECTRA
...




Security Hole

22 04 2008

From cracker who defaced depkominfo.go.id :

beberapa kelemahan pada situs depkominfo:
XSS
SQLi
LFI/RFI

beberapa settingan pada depkominfo.go.id yg membantu proses hacking:
allow_url_include = on
magic_quotes_gpc = off
user mysql memiliki file_priv on
beberapa folder pada root document yang memiliki write permission untuk user apache





PHP Redirect to SSL

2 04 2008
<?php
if ($_SERVER['SERVER_PORT'] != 443) {
	header("HTTP/1.1 301 Moved Permanently");
	header("Location: https://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);
	exit();
}
?>