I am mikek's Blog

The personal blog of Mike Karthauser, who you may know from Brightstorm Limited or the internet.

Changing the path to site root in cpanel

For changing the main/primary domain, you will need to have root SSH access and be able to locate and edit the following file (replacing your user & domain info):

cd /var/cpanel/userdata/USERNAME/DOMAIN.COM

1. Once you have opened the file, look for the following line:

documentroot: /home/USERNAME/public_html

2. Modify the location according to your needs. Save it and exit.

3. Rebuild the Apache conf and restart Apache:

/scripts/rebuildhttpdconf
service httpd restart

http://blog.servint.net/2012/03/30/the-tech-bench-changing-a-document-root-in-cpanel/

Advertisements

Filed under: code snippets, development

Passive Infra Red sensors and the Raspberry Pi

It’s taken a while to arrive, but finally I have received my infra red sensor that I ordered from china via EBay.

It’s a simple circuit: just power and 1 GPIO port. I followed the circuit I covered in a previous post, and produced the following.

20130320-215931.jpg

The sensor has two things you can adjust: sensitivity and time – the amount of time the circuit stays on – between 2 and 200 seconds.

Filed under: raspberry pi

Fun with ultrasonics on Raspberry Pi

SRF05 ultra sonic range configured following Matt Hawkins example circuit and python script I hooked up the following:

20130311-230339.jpg

This circuit allows for the setting of events specific to certain distances. I configured a message to change depending on how far the dog was away:

20130311-231230.jpg

The future scope is to trigger another GPIO pin depending on location which could activate a warning sound

Filed under: raspberry pi

Making blank worlds in Minecraft Pi edition

Winkleink has a python script that creates blank levels in Minecraft Pi edition so you can run your own builds on the flat ground you’ve created.

http://winkleink.blogspot.co.uk/2013/02/raspberry-pi-minecraft-and-python.html?m=1

Filed under: minecraft, raspberry pi

Photonic Professional GT – nano 3d printer

This little spaceship, known as the Hellcat, was printed using the worlds fastest commercial 3d nano printer, the Nanoscribe Photonic Professional GT. It measures just 125µm x 81µm x 26.8µm (l x w x h) and is about as long as the width of a human hair.

The Photonic Professional GT uses a 3D laser lithography system developed by Nanoscribe that can handle data transfer rates of more than 5 terabits per second. The system achieves its high-speed through the use of galvo technology – a series of rotating mirrors that deflect laser light for quick and precise focus. Similar technology is used in laser light shows and in the scanning units of CD and DVD drives.

read more

20130304-223503.jpg

Filed under: 3d printing

SRF05 Ultra Sonic Ranger

Datasheet for SRF05 Ultra Sonic Ranger.

20130303-222356.jpg

Ill be following Matt at Raspberry Pi Spy has a example python script which covers hooking it up to the Pi

Filed under: raspberry pi,

what's hot

Flickr Photos

Sponsor Mike run the Bath Half marathon

mikek on twitter