Forfatterarkiv: black

Extract a mysql query to XML

echo “select * from table” | mysql -B –xml -h [host] -u [user] -p[password] [database] > output.xml not all of the parameters are needed of course. use –table if you want the nice ascii tables around the result if -B … Læs resten

Udgivet i Knowledge Base, Old Base, SQL | Skriv en kommentar

Install Mono on Debian

This works on Sarge and Etch: apt-get install mono libmono-corlib2.0-cil

Udgivet i Knowledge Base, Linux, Old Base | Skriv en kommentar

Layout til IPAccounting

Traffic trafid INT AUTOINCREMENT time DateTime \ ip INT / Burde være lavet som kombined key med clustered index? sent INT recieved INT Index på `time` og `ip` LocalIPs lid INT AUTOINCREMENT ip INT description VARCHAR(255)

Udgivet i Knowledge Base, Old Base | Skriv en kommentar

HP Procurve commands

Many commands are similar to cisco IOS. Locate a specific mac addres in the port table: switch1.mcn.dk# show mac-address 0010a7-0600d4 Status and Counters – Address Table – 0010a7-0600d4 MAC Address : 0010a7-0600d4 Located on Port : 25

Udgivet i HP, Knowledge Base, Networking, Old Base | Skriv en kommentar

XML formatting with xmllint

To get a nice output of any xml file: xmllint –format <file> To strip all spaces, tabs and newlines: xmllint –noblanks <file> For sorting look at xmlstar.sourceforge.net

Udgivet i Knowledge Base, Old Base | Skriv en kommentar

D-link Switch config

reset config ipif System ipaddress 192.168.1.200/24 config stp priority 49152 config stp ports 1-22 state disable config stp ports 25 cost 100000 priority 144 migrate yes state enabled config stp ports 26 cost 200000 priority 160 migrate yes state enabled … Læs resten

Udgivet i Knowledge Base, Networking, Old Base | Skriv en kommentar

UN / LOCODE City Codes

http://www.unece.org/cefact/locode/service/location.htm

Udgivet i Links | Skriv en kommentar

LVM Commands

# Grow a file system: SIZE=+220G DEVICE=/dev/vg1/misc lvextend -L${SIZE} ${DEVICE} && umount ${DEVICE} && e2fsck -f ${DEVICE} && resize2fs ${DEVICE} ; mount ${DEVICE} # Shrink a filesystem: umount ${DEVICE} && e2fsck -f ${DEVICE} && resize2fs ${DEVICE} ${SIZE} && lvresize -L${SIZE} … Læs resten

Udgivet i Knowledge Base, Linux, Old Base | Skriv en kommentar

How to slipstream an windows XP cd

Look <a href=”http://www.maximumpc.com/2005/01/how_to_slipstre.html”>here</a>..

Udgivet i Knowledge Base, Old Base, Windows | Skriv en kommentar

UUID / GUID generator

http://kruithof.xs4all.nl/uuid/uuidgen

Udgivet i Links | Skriv en kommentar