Vladimirr’s pancakes

Ingredients:
250 gram wheat flour,
6 dl milk, 
4 eggs, 
2-3 teaspoonful sugar, 
1/4 - 1/2 teaspoonful salt
60 gram margarine

HOWTO:
Mix the milk and the flour, add sugar and salt and the 4 eggs and mix it all.
Melt the margarine on the pan and mix it into the batter.

Bake the pancakes medium brown and eat with sugar, syrup, jam or whatever you like. (icecream is also pretty nice)
Vladimirr.dk
Udgivet i Knowledge Base, LifeHack | Skriv en kommentar

Tilpas vindue efter indholds stoerese[IE]

<body leftmargin="0" topmargin="0" rightmargin="0" onblur="self.close();">

<div id='mydiv'>
1blablablalbalbalbalabababfgadZ
2blablablalbalbalbalabababfgadZ
3blablablalbalbalbalabababfgadZ
4blablablalbalbalbalabababfgadZ
</div>
<script>
w=document.all["mydiv"].clientWidth || document.getElementById("mydiv").offsetWidth;
h=document.all["mydiv"].clientHeight || document.getElementById("mydiv").offsetHeight;
document.write(document.body.offsetWidth);
document.write(document.getElementById("mydiv").offsetHeight);
window.resizeTo((document.body.offsetWidth+6),(document.getElementById("mydiv").offsetHeight+30));
</script>
Udgivet i Knowledge Base, Old Base, Programmering | Skriv en kommentar

Stoerelsen paa en div i javascript [IE Only]

<div id='mydiv'>
Hvor hoej er den her crap div??<br><br><br>Saa hoej?
</div>
<script>
height=document.all["mydiv"].clientHeight || document.getElementById("mydiv").offsetHeight
width=document.all["mydiv"].clientWidth || document.getElementById("mydiv").offsetWidth
alert(height+' '+width)
document.write(document.mytab.style.offsetHeight);
</script>
Udgivet i Knowledge Base, Windows | Skriv en kommentar

Størrelsen på en div i javascript [IE Only]

<div id='mydiv'>
Hvor hoej er den her crap div??<br><br><br>Saa hoej?
</div>
<script>
height=document.all["mydiv"].clientHeight || document.getElementById("mydiv").offsetHeight
width=document.all["mydiv"].clientWidth || document.getElementById("mydiv").offsetWidth
alert(height+' '+width)
document.write(document.mytab.style.offsetHeight);
</script>
Udgivet i Old Base, Programmering, Windows | Skriv en kommentar

Tailing dmesg [mike style]

while true; do clear; dmesg | tail; sleep 2; done;
Udgivet i Knowledge Base, Shellscript | Skriv en kommentar

Blaster removal

http://securityresponse.symantec.com/avcenter/venc/data/w32.blaster.worm.html

Udgivet i Old Base, Security | Skriv en kommentar

Blaster removal

http://securityresponse.symantec.com/avcenter/venc/data/w32.blaster.worm.html

Udgivet i Knowledge Base, Security | Skriv en kommentar

Easy way to make new passwords

On FreeBSD:
jot -r -c 160 a { | rs -g 0 8

It will output something like this:
whhmuqxn
amajtohu
ydtetwjw
ysnctfcl
svsiypsf
cvalnoex
dvoburbw
fedkcmfx
pikwqwiv
umaxmqcq
iqmtcnny
vsunccxj
owghvpgo
lndrpswr
flgtvyjz
vphojoqc
zofbcxto
reaixjhj
hmoeabtg
fukuimvk
//Vladimirr.dk
Udgivet i FreeBSD, Knowledge Base, Old Base | Skriv en kommentar

Register globals workaround

Be sure to think of the consequenses

<?
        if (!empty($_REQUEST)) { extract($_REQUEST); }
        print $fisk;
?>
Udgivet i Knowledge Base, Old Base | Skriv en kommentar

ProFTPD via MySQL

ProFTPD via MySQL
With mod_sql you can handle your user authentication in ProFTPD via an MySQL table.
Required is a fresh compiled actual ProFTPD with mod_sql enabled.

Enable mod_sql

./configure --with-modules=mod_sql:mod_sql_mysql


First you should create an new datebase named "proftpd" with a table named "users" in it.

Create the database and table

CREATE DATABASE proftpd;
CREATE TABLE `users` (
  `username` varchar(128) NOT NULL default '',
  `password` varchar(128) NOT NULL default '',
  `homedir` varchar(128) NOT NULL default '',
  `shell` varchar(128) NOT NULL default '',
  `uid` smallint(5) NOT NULL default '0',
  `gid` smallint(5) NOT NULL default '0',
  `last_login` datetime NOT NULL default '0000-00-00 00:00:00',
  `active` enum('0','1') NOT NULL default '1'
) TYPE=MyISAM;


Now add the following lines to your /etc/proftpd/proftpd.conf and restart the ProFTPD daemon.

/etc/proftpd/proftpd.conf

# MySQL
SQLAuthTypes         Plaintext
SQLAuthenticate      users*
SQLConnectInfo       <user>@<host> <database> <password>
SQLDefaultUID        65534
SQLDefaultGID        21
SQLMinUserUID        3000
SQLMinUserGID        21
SQLUserInfo          users username password uid gid homedir shell
SQLLog PASS login
SQLNamedQuery login UPDATE "last_login = NOW() WHERE username = '%u'" users
Udgivet i Knowledge Base, Old Base, SQL | Skriv en kommentar