Category Archives: Computers

Your WordPress Metadata theme patch

<?php $meta_values = get_post_meta(get_the_ID()); $original_urls = ”; foreach ($meta_values[‘original_url’] as $url) { $original_urls .= “Original URL : <a href=\”$url\”>$url</a><br />”; } ?>   <?php print “<small>$original_urls</small><br />”; ?>

Installing VMWare Tools on FreeBSD 9

Virtualizing a FreeBSD server is common place. Knowing how to install VMWare Tools on a FreeBSD server without X11 is going to be extremely important. This article will provide the steps. Lets get started. Step 1 – Install FreeBSD as VMWare Guest. Instructions for installing FreeBSD 9 are found here: How do I install FreeBSD 9?… Read More »

FreeBSD install procedure

Install FreeBSD as per your requirements. Update! Update 1: freebsd-update fetch freebsd-update install portsnap fetch portsnap extract or freebsd-update fetch install portsnap fetch extract Update 2: As you can read in the comments, it is good to know that you only have to “extract” the ports tree once and for every subsequent update to the… Read More »

Delphi stuff to read but not gotten around to March 2013

http://podgoretsky.com/ftp/Docs/Delphi/D5/dg/packcomp.html http://webcache.googleusercontent.com/search?q=cache:0F0aoNui5HwJ:podgoretsky.com/ftp/Docs/Delphi/D5/dg/packcomp.html+&cd=1&hl=en&ct=clnk&gl=uk (Google Cache of Above) http://etutorials.org/Programming/mastering+delphi+7/Part+II+Delphi+Object-Oriented+Architectures/Chapter+10+Libraries+and+Packages/

Monitoring Draytek routers

http://www.paessler.com/prtg/download http://download-eu.paessler.com/download/prtgtrial.zip When asked for an email address enter anything you want. When asked for a License key click “Skip this” below the text boxes.   SNMP OIDs Known to work with Draytek 2830 ADSL WAN1 Up Sync 1.3.6.1.2.1.10.94.1.1.5.1.2.4 ADSL WAN1 Down Sync 1.3.6.1.2.1.10.94.1.1.3.1.8.4 ADSL WAN1 SnR 1.3.6.1.2.1.10.94.1.1.3.1.4.4 ADSL WAN1 Loop Att 1.3.6.1.2.1.10.94.1.1.3.1.5.4 ADSL WAN1 InOctals 1.3.6.1.2.1.2.2.1.10.4 (DELTA!!) ADSL WAN1… Read More »

PDF Creator Silent Install

PDF Creator v1.6.2 Inc Silent Install Batch File e.g. PDFCreator-Setup.exe /verysilent /norestart Update 28-05-2015 Direct Download Link for latest version of PDF Creator is http://download.pdfforge.org/download/pdfcreator/PDFCreator-stable?download Links downloads a PDFCreator-2_1_1-setup.exe. Note, Chrome refuses to download it saying its malicious and Firefox blocks it with a message “May contain a virus or spyware”. I think this is due to… Read More »

Get application / file version information.

function GetVersion2(const theFileName: string): string; var VerInfoSize: DWORD; VerInfo: Pointer; VerValueSize: DWORD; VerValue: PVSFixedFileInfo; Dummy: DWORD; begin Result := ”; VerInfoSize := GetFileVersionInfoSize(PChar(theFileName), Dummy); if VerInfoSize = 0 then Exit; GetMem(VerInfo, VerInfoSize); GetFileVersionInfo(PChar(ParamStr(0)), 0, VerInfoSize, VerInfo); VerQueryValue(VerInfo, ‘\’, Pointer(VerValue), VerValueSize); with VerValue^ do begin Result := IntToStr(dwFileVersionMS shr 16); Result := Result + ‘.’ +… Read More »

Storing application data in Windows XP and higher

uses ShlObj; function GetSpecialFolder(const CSIDL: integer) : string; var RecPath : PWideChar; begin RecPath := StrAlloc(MAX_PATH); try FillChar(RecPath^, MAX_PATH, 0); if SHGetSpecialFolderPath(0, RecPath, CSIDL, false) then result := RecPath else result := ”; finally StrDispose(RecPath); end; end; And I call it with GetSpecialFolder(CSIDL_APPDATA) Where the list of CDISL is defined here. GetSpecialFolder(CSIDL_APPDATA) returns C:\Users\username\AppData\Roaming in Windows List of CDISL… Read More »

WordPress Security

SSL and Cookies in WordPress 2.6 HOWTO: Set up secret keys in WordPress 2.6+ Secret Key Generator

Enable Verbose Status Messages in Windows 7

http://www.thewindowsclub.com/enable-verbose-status-message-windows http://www.google.co.uk/url?sa=t&rct=j&q=enable-verbose-status-message-windows&source=web&cd=1&cad=rja&sqi=2&ved=0CC8QFjAA&url=http%3A%2F%2Fsupport.microsoft.com%2Fkb%2F325376&ei=VJgTUYX7J6al0AWT8IDgDg&usg=AFQjCNH_YtkYnOeJeWmN4cRtZEinfPc3Hg&bvm=bv.42080656,d.d2k  

WMI and Operating System Version

Operating system Version number Windows 8 6.2 Windows Server 2012 6.2 Windows 7 6.1 Windows Server 2008 R2 6.1 Windows Server 2008 6 Windows Vista 6 Windows Server 2003 R2 5.2 Windows Server 2003 5.2 Windows XP 64-Bit Edition 5.2 Windows XP 5.1 Windows 2000 5 eg SELECT * FROM Win32_OperatingSystem WHERE Version LIKE “5.%”

SNMP Browsing Software

Tembria SNMP Browser – Very hardy for seeing which OIDs are available on any give SNMP host. Been rebranded to FrameFlow and this FreeWare tools seems to have been removed, but its still available from here (me only) or by Googling for Tembria SNMP Browser and finding some find hosting websites.

Windows 7 Disk utilities

How to make a universal Windows 7 disk http://code.kliu.org/misc/winisoutils/ How To Create Bootable Windows 7 USB To Install Windows 7 From USB Flash Drive (Using Windows 7 DVD/USB Tool) How To: Install Windows 7 Or Windows 8 From USB Drive [Detailed 100% Working Guide]

PHP and MySQLi SELECT query

<?php $i = new mysqli(‘localhost’, ‘username’, ‘password’, ‘database’); if ($result = $i->query(“SELECT * FROM tablename;”) ) { printf(“Select returned %d rows.\n”, $result->num_rows); if ($result->num_rows > 0) { while ($row = $result->fetch_object()) { print_r($row); } } $result->close(); } else { printf(“%d : %s\n”, $i->errno, $i->error); } ?> if (!$i->query(“INSERT INTO table VALUES(null, ‘x’,’x’,’x’);” ) ) {… Read More »

Category: PHP

Munin plugins

Example, trying to get portaudit plugin working… Download https://raw.github.com/munin-monitoring/contrib/master/plugins/audit/portaudit to /usr/local/share/munin/plugins/portaudit. chmod a+x /usr/local/share/munin/plugins/portaudit. running “munin-run portaudit” results in the following error # Unknown service ‘portaudit’ running “munin-node-configure –shell” tells me to run the following o create the symbolic link. ln -s ‘/usr/local/share/munin/plugins/portaudit’ ‘/usr/local/etc/munin/plugins/portaudit’ running “munin-run portaudit” now works.