Search This Blog

Saturday, 22 November 2014

WordPress MultiSite Admin Slow

After upgrading from 3 -> 4 the admin panel became utterly unusable. 20-30 seconds on any action.

Found -

And for me :
Manually run /wp-admin/upgrade.php
UPDATE 25/1/2015 - Also had to do this for 4.0 -> 4.1 Upgrade

RaspberryPI / Motion & Multiple USB Cameras

Playing around with Motion on Raspian.  Motion was simple to setup with a single camera but when I added a second and switched to the thread config files I started to get :

Unable to query input 1 VIDIOC_ENUMINPUT: Invalid argument
Tracked it to a setting in the default thread2.conf
# The video input to be used (default: 8)
# Should normally be set to 1 for video/TV cards, and 8 for USB cameras
input 1
Change the input to 8 and all is well

Friday, 7 November 2014

CentOS 7 Missing ifconfig command

CentOS 7 no longer ships with the command/s.  You can install via yum
sudo yum install net-tools

Friday, 26 September 2014

Add a static route to QNAP NAS

Can't be done via the GUI so you need to use some CLI foo.  You can set a route temporarily via the shell but in order for it to remain persistent you need to edit the startup script.

1 - Connect via ssh to your device
2 - Mount the QNAP Configuration

The name of the actual device to mount depends on your model number. In general for x86-based systems this should be /dev/sdx6. For Marvell ARM based models it should be /dev/mtdblock5 or /dev/mtdblock4.
[~] # mount -t ext2 /dev/sdx6 /tmp/config

2 - Create or adapt

A shell script called “” will be executed by your QNAP storage system on every startup. It might be possible that file currently does not exist so just go ahead and create it with your favorite text editor, or the whatever is installed.
route add -net <subnet> netmask <mask> gw <gw_ip_addr>
3 - Make sure that is executable
In order to be executable during startup, we will have to set the executable flag for “”:
[~] # ls -al /tmp/config/
-rw-r--r--    1 admin    administ       60 May 11 17:43 /tmp/config/*
[~] #
[~] # chmod +x /tmp/config/
[~] #
[~] # ls -al /tmp/config/
-rwxr-xr-x    1 admin    administ       60 May 11 17:43 /tmp/config/*
[~] #
4 - Unmount the config
[~]# Unmount /tmp/config

Sunday, 17 August 2014

OSX Proxy [on/off] Script


e=$(networksetup -getwebproxy wi-fi | grep "No")

if [ -n "$e" ]; then
  echo "Turning on proxy"
#  sudo networksetup -setstreamingproxystate wi-fi on
#  sudo networksetup -setsocksfirewallproxystate wi-fi on
  sudo networksetup -setwebproxystate wi-fi on
  sudo networksetup -setsecurewebproxystate wi-fi on
  echo "Turning off proxy"
#  sudo networksetup -setstreamingproxystate wi-fi off
#  sudo networksetup -setsocksfirewallproxystate wi-fi off
  sudo networksetup -setwebproxystate wi-fi off
  sudo networksetup -setsecurewebproxystate wi-fi off


Wednesday, 23 July 2014

Extend Windows 7 VirtualBox Disk

  1. Use the VirtualBox client to create a new disk of the size you want in the same directory as your guest.
  2. Clone the old disk to the new.  Open a command prompt, navigate to the guest directory and run :
  3. VBoxManage clonehd   --existing
  4. Attach the new disk to the guest and detach the old disk.  Ensure the new disk is first in the list / SATA 0
  5. Guest should now boot up.  If you find it asks you to select a boot disk then the order is incorrect as per step 3
  6. Open Windows disk manager, It will currently show the old size with #GB free.  Right click, extend, follow the prompts.
  7. Confirm everything is good and you can delete the old disk.
Thats it, you're done ...

Thursday, 19 June 2014

Re-enable the Apple-provided Java SE 6 web plug-in and Web Start features

Use this at your own risk as Apple, and most people distrust JAVA.

Taken from

  1. Open Terminal, located in the Utilities folder.
  2. Enter this command, then press the Return or Enter key: 
    sudo mkdir -p /Library/Internet\ Plug-Ins/disabled 
  3. Enter this command, then press the Return or Enter key:
    sudo mv /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin /Library/Internet\ Plug-Ins/disabled
  4. Enter this command, then press the Return or Enter key:
    sudo ln -sf /System/Library/Java/Support/Deploy.bundle/Contents/Resources/JavaPlugin2_NPAPI.plugin /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin 
  5. To re-enable Java SE 6 Web Start, enter this command, then press the Return or Enter key:
    sudo ln -sf /System/Library/Frameworks/JavaVM.framework/Commands/javaws /usr/bin/javaws

Additional Information

The following steps will undo the above commands and restore Java 7 in OS X Lion and later.
  1. Disable Java SE 6 Web Start opening:
    • Enter this command, then press the Return or Enter key:
    • sudo ln -sf /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/javaws /usr/bin/javaws
    • When prompted, enter your administrator password, then press the Return or Enter key.
  2. Re-enable the Java 7 applet plug-in by downloading and reinstalling the latest version of Oracle Java 7 JRE.

Thursday, 5 June 2014

Basic Syslog-NG Install & Config

Ubuntu OS, apt syslog-ng install & added the following lines to get a basic UDP server running.

options { 
<Keep all the default Options>
source s_net { 
udp(ip( port(514));

destination d_any_remote {

log {
source(s_net); destination(d_any_remote);

Sunday, 20 April 2014

Flash, Chrome & an Atom CPU all walk into a pub

Tried to watch something on 4OD catchup via my HTPC (Zotac ION ATOM 1.6) last week.  Dreadful., choppy and stuttering, in the end I gave up.

Today I decided to debug and see if I could fix it.

Firstly browsing in general also seemed slow.  Hit a well known bandwidth testing site and it was reporting 70-80ms latency.  Odd as no other device in the house showed the same problem, all in the 27-35ms range.

Spent a ton of time looking into this starting with networking\drivers being the source of the problem as it, even started packet tracing!   CLI pings all seemed fine, file download comparisons, all fine.  Finally, and I mean after a day of screwing around and almost a total rebuild, I cleared the cache on Chrome.  Bingo, latency fixed.  WTF! ..

Chrome and pepperflash were throwing the bandwidth test out, and guess what 4OD, flash site .. I think I have found the issue.

Seems like any flash site on Chrome pushes the CPU, on the ATOM its just too much, 90-100% .. Same on my desktop but its a way faster CPU so copes.  Never really appreciated what a great job flashblock does for me.

Switched to Firefox & Adobe Flash and all is well again .. for now

Thursday, 17 April 2014

Billion 7800N & Sky Broadband

Despite my disgust for the Murdoch empire when BE Broadband sold out to Sky I was stuck with a decision, particularly as Hyperoptic have just flooded the area I live in.

The BE service got so bad 1-2Mb that in the end I called to cancel.  I walked away with a 12 month Sky deal, 5Mb estimate and basically nothing to pay until September.  After some teething issues they got me the bandwidth promised and I'm relatively happy.  I will still jump to Hyperoptic when I actually need to start paying for a service.

In the meantime I wanted to get my Billion 7800n working on this line .. Forums answered me here.

And for my own memory :

  1. Firmware >1.06h
  2. Follow below :

Thursday, 23 January 2014

64-bit Linux, 32-bit Chrome & Cisco AnyConnect

Obvious when you think about it but 32Bit Chrome will fail to connect to make the initial the SSL/HTTPs connection and so download/prompt for the client.

Switch to Firefox (Other 64Bit browsers are available) and you'll be good.

Wednesday, 1 January 2014

Blocking Facebook Connect/Graph

Browsing the web and you hit a site that displays your friends list, or suggests you 'like' this page because xyz of your friends also do.

Never paid that much attention until my g/f today mentioned my friends appear on sites she looks at. Of course they do! WTF did I never consider this.

Not that we have that type of secret relationship but when I started digging into Facebook connect, or now graph as it seems to be the more I hated it.

I'm way late to this party but to block this:

  1. Install AdBlock - & pay this guy money, its a great product!
  2. Create some filters to block access to the connect URLs

and/or add these to the filter list:^$|||^$|||^$|||^$|||
Thats it.