Kategoriarkiv: Old Base

Xini file parser v1.0

<? # Xini parser v1.0 by MC Solutions 2007, all righs reserved /* Samlpe file: menu.xini: !Structure=Text,Url [Menu] Item=”Om firmaet”,”about.php” Item=”Kontakt firmaet”,”contact.php” [Menu2] Item=”Bestil”,”order.php” Item=”Log ind”,”login.php”,”nisse”,”fisk” [forside] Titel=”Bla bla bla” BestilLink=”Bla bla bla” EOF !Structure describes the name of the … Læs resten

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

Installing mailserver on Debian

### Install packages needed: apt-get install apache2 mysql-server libapache2-mod-php5 php5-mysql postfix postfix-mysql courier-authlib-mysql courier-imap courier-pop ### Answers: Create Web Based Configuration: NO General type of configuration: Internet Site Mail name: mail02.ar.mcn.dk ### Run this to edit /etc/postfix/main.cf: postconf -e myhostname=mail02.ar.mcn.dk … Læs resten

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

Creating PDF Files from PHP on debian

apt-get install php-fpdf look for tutorials and documentation at: http://www.fpdf.org/ add fpdf to the include path, and save yourself the hazzle to edit it every time: include_path = “.:/usr/share/php:/usr/share/php/fpdf” (in php.ini (DUH!))

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

Generating java code from JavaDoc HTML

Cut’n’paste the method summary to the created class. Use this search and replace in VS.NET: Search: ^{[^\)]*}\) \n:b*{[^\n]*}$ Replace: \n/**\n * \2\n */\npublic \1) { } For interfaces use this replace: \n/**\n * \2\n */\n\1); Strip blank comment blocks with: … Læs resten

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

Get enums fra mysql in php

PRIVATE function GetEnums($table,$field) { $dat=mysql_fetch_array(mysql_query(“show columns from `$table` like ‘$field’;”,$this->MysqlResource)); return(preg_split(“/’|,|enum|\(|\)/”,$dat[‘Type’],null,PREG_SPLIT_NO_EMPTY)); }

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

SSH Mount in Ubuntu

I did the following, you might not need to do it all: Create mount dir and chown it to the user who needs to access it. Add the following line to fstab: sshfs#USERNAME@SERVER:/PATH /mnt/MOUNTPOINT fuse defaults,noauto,user,uid=mike,gid=mike,allow_other,reconnect,transform_symlinks 0 0 For automated … Læs resten

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

Installing webserver on Debian

apt-get install apache2 mysql-server php5-mysql

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

How to fix broken MMConfig on ASUS K8N4-E Deluxe

Remove support for mmconfig config space access in the kernel configuration, it’s broken on Asus boards with recent kernels apparently (I have this board, and nothing that’s connected on PCI works with mmconfig enabled). It’s here in the kernel configuration: … Læs resten

Udgivet i Knowledge Base, Old Base | Skriv en kommentar

SOURCE: Generic PHP Autoloader

<? // COPYRIGHT (c) 2007 MC Solutions /** * Class to handle autoloading of Php class files */ Class AutoLoader { private $files; private $error; private $use_session_cache = “true”; /** * Tells the AutoLoader what to do when duplicate class … Læs resten

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

Cisco 1760 Config with CyberCity G.SHDSL Config

! To Apply this config, alter the following things: ! * CyberCity DSL Password ! * Telnet Password ! * Enable password ! * Access-list for telnet access. ! ! Then paste the commands into the console terminal, ! after … Læs resten

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