Forfatterarkiv: black

mod_proxy config

<VirtualHost thor.btworld.dk> ServerName thor.btworld.dk DocumentRoot /var/www/thor_redirect/htdocs ProxyPass /samurize/ http://thor.btworld.dk/samurize/ ProxyRequests Off </VirtualHost>

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

putty tunnels from system tray

This is how to connect some ssh forwarded ports without having any unused putty windows in the taskbar. First download and install putty and configure pageant to start with windows. (use the installer package, not the standalone putty.exe) Make som … Læs resten

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

C# write XML to stream with XmlDocument

Stream outputStream = new MemoryStream(); XmlDocument doc = new XmlDocument(); XmlElement root = doc.CreateElement(“packet”); XmlElement type = doc.CreateAttribute(“type”); if (this.request) type.Value = “request”; else type.Value = “response”; root.AppendChild(type); XmlElement callElement = doc.CreateElement(“call”); XmlAttribute funcAttr = doc.CreateAttribute(“func”); funcAttr.Value = this.func; callElement.AppendChild(funcAttr); … Læs resten

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

how to edit strings with mysql

Mysql replace is nice UPDATE `users` SET homedir = REPLACE(homedir, ‘/home/daemons’, ‘/home/vmail/’), maildir = REPLACE(maildir, ‘/home/daemons’, ‘/home/vmail/’);

Udgivet i Knowledge Base, Old Base | Skriv en kommentar

how to add a user to a group

This is a nice way to add a user to a new group, from any script or other non-interactive metod: usermod -G $(id -nG root | sed -e “s/ /,/g”),vmail root

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

proftpd bandwith limit

<Directory /> AllowOverwrite on TransferRate APPE,RETR,STOR,STOU 25:1024 user !black </Directory> limits to 25KB/s with a 1024KB fullspeed limit, excludes the user black  

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

mysql from java

Courtesy from http://www.javacoding.net/articles/technical/java-mysql.html === Introduction Many people requested a tutorial on how to access MySQL from Java. The standard way of working against a relational database from Java is by using the JDBC API. (the Java Database Connectivity API). This … Læs resten

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

Dynamic Virtual Hosts in apache

#Simple dynamic virtual hosts # # This extract from apache2.conf implements the virtual host arrangement # outlined at http://www.apache.org/docs/vhosts/mass.html, using # mod_vhost_alias. # get the server name from the Host: header UseCanonicalName Off # # this log format can be … Læs resten

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

gprs internet på en nokia telefon

opret en modemforbindelse der bruger mobil telefonen som modem, og brug flg opkalds data: tlf nr: *99***1# bruger: ingen kode: ingen det sidste 1 tal skal måske skiftes hvis mobilen kører på et andet CID

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

redirect of banned users in firewall

the table `macs` have a field `mac` which identifies the banned computer, and a field `status` which identifies the state of the computer. to redirect the users: <pre> for mac in $( echo “SELECT mac FROM macs WHERE status=’banned’;” | … Læs resten

Udgivet i Apache, Old Base | Skriv en kommentar