This is a revised article that I wrote some time ago, I think this model serves the end-users better as it allows the CREATOR OWNER’s of the files in the ‘Dropbox’ to modify their work , while protecting files that other users have submitted.

In this example, we will have a group “Staff” who can access all files, and a group “Students” who can only create and modify their own files.

1. Create a folder called “Dropbox”

2. Right-click, choose Properties, Security, Advanced.

3. Remove Inheritance and all permission entries.

4. Add the following principals (groups) and (advanced) attributes;

Administrators – Allow – This folder, subfolders and files.
All Permissions (Full Control)

Staff – Allow – This folder, subfolders and files.
Traverse folder
List folder
Read attributes
Read extended Attributes
Read permissions

Staff – Allow – Subfolders and files only
Traverse folder
List folder
Read attributes
Read extended attributes
Create files
Create folders
Write attributes
Write extended attributes
Delete
Read permissions

Students – Allow – This folder only
Traverse folder
List folder
Read attributes
Read extended attributes
Create files
Create folders
Read permissions

Students – Allow – Subfolders and files only
Create files
Create folders
Write attributes
Write extended attributes
Read permissions

CREATOR OWNER – Allow – Subfolders and files only
Traverse folder
List folder
Read attributes
Read extended attributes
Create files
Create folders
Write attributes
Write extended attributes
Delete subfolders
Delete
Read permissions

EVERYONE – Deny – This folder only
Delete

SYSTEM – Allow – This folder subfolder and files
All Permissions (Full Control)

Like Pinball? Want your own? Build an emulator!

For years now, a thriving underground community has existed around virtual pinball simulators. The leading two are Future Pinball and Visual Pinball. The tables are recreated by fans and owners of the original pinball machines, as well as tutorials. Many of which can be found on sites like VPForums.org.

As well as the simulators, there’s a front end menu system for cabinets called HyperPin, created by the HyperSpin guys who originally did front ends for MAME cabinets.

So I decided to build my own pinball cab…

_MG_3660
The base cabinet. Some MDF, a biscuit joiner and glue and it almost built itself.

_MG_3741
The spacers for the motherboard and holes for fan grill and power switches.

_MG_3735
Primer coat.

_MG_3752
4 coats of black gloss and some spray paint to get into the nooks and grill holes.

_MG_3772
Base and Backbox with buttons.

_MG_3800
Power and Mains switches.

_MG_3815
Rear View

_MG_3847
PC components.

_MG_3936

All the bits.

_MG_3919

The Final Product!

Some gameplay…

and the button lighting, done with Arduino Nano

Questions…

Q: How much did it cost?
A: To buy all the bits brand new retail, (2x screens, computer components, arcade buttons, usb controllers, speakers, MDF, foam, cabling, crimps, paint, adhesives, etc. etc.) you’re looking at around $1200 AUD. I scrounged around and managed to build it for about half that.

Q: How much is the software?
A: Apart from the Windows operating system the software is free, but it does take some tweaking with settings to get it all up and running seamlessly. It took me the better part of 2 days to get it all running properly.

All in all I think it turned out well – apart from being fun to build, it’s even more fun to play and that’s what’s important!

Just so happens I’ve written my first article for CodePeach.com, the first of hopefully many. CodePeach has some great stuff to read if you’re into PHP/MySQL or jQuery/Javascript, check it out!

Installing a Web Server with PHP and MySQL

A problem i’ve been fidgeting with all weekend… Seems PHP 5.5 and jQuery suddenly got fussy about handling JSON data.

The short version… in jQuery use $.ajax() instead of $.getJSON()

PHP Side

// $group array needs all strings to be UTF-8 encoded.
print json_encode($group, JSON_FORCE_OBJECT, 3);

jQuery Side

$.ajax({
    type: "POST",
    url: "_apget.php",
    contentType: "application/json; charset=utf-8",
    dataType: "json",    
    success: function(data) {
        for (var index in data) {
	    console.log(data[index]);
        }
    },
    error: function(jqXHR, Status, Error) {
        alert("Status: "+Status+" Error: "+Error);
    }
});

This is a post to cover off a few issues I encountered trying to build an ntopng server on CentOS 6.5

Firstly, you need to install the EPEL 6 repository.

yum -y install http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

Then you need to add the ntop repository (manually)

vi /etc/yum.repos.d/ntop.repo

[ntop]
name=ntop packages
baseurl=http://www.nmon.net/centos/$releasever/$basearch/
enabled=1
gpgcheck=1
gpgkey=http://www.nmon.net/centos/RPM-GPG-KEY-deri

Update your repositories and install ntopng and its dependencies

yum clean all
yum update
yum install pfring n2disk nProbe ntopng ntopng-data nbox

*Note: At this point I had a Transaction Check error because my kernel was newer than what the ntop compile expected, so I had to install an older kernel for the yum install to complete. If the above completes without an error you can skip this step, else grab the older kernel and try the package install again.

yum -y install kernel-2.6.32.431.20.3.el6

Once installed, you want to edit the configuration files.

vi /etc/ntopng/ntopng.start

--local-networks "192.168.0.0/24"
--interface 0

and copy the default configuration

cp /etc/ntopng/ntopng.conf.sample /etc/ntopng/ntopng.conf

You’re pretty much done, except for a bit of housekeeping.

Set the services to start automatically.

chkconfig redis on
chkconfig ntopng on

Add an exception to the firewall

vi /etc/sysconfig/iptables

-A INPUT -m state --state NEW -m tcp -p tcp --dport 3000 -j ACCEPT

Restart the firewall

service iptables restart

and Start the ntopng services…

service redis start
service ntopng start

Done!

Browse to the server http://youserver:3000
Login with admin/admin

Thanks to RedBranch, Nmon and others for helping me piece this together.

Installing a WIMP server just got heaps easier thanks to the Microsoft Web Platform Installer.

Go grab it, run it on your Server 2012R2 instance and install the PHP 5.5.3 and MySQL components.

It will setup your IIS install with PHP, FastCGI module and WinCache extensions and save you heaps of time and fuss. The PHP management addin for IIS Management Console is a nice touch also, as you can change all the php.ini parameters, enable/disable extensions etc. right in the management GUI.

The only catch I found was that the PHP binaries and FastCGI module need the x86 and x64 Visual C++ Runtimes, which the WebPI installer doesn’t fetch? Anyway, grab them as well and you should be good to go.

Here’s a snippet of PHP Code I’ve been using to interrogate our switches SNMP data for graphing.

<?php
/* HP MSM Controller */
$ip = '10.0.0.1';
$oid = 'iso.3.6.1.4.1.8744.5.23.1.2.1.1'; //ap's

/* HP Procurve Switch */
//$ip = '10.0.0.2';
//$oid = 'iso.3.6.1.2.1.2.2.1.2'; //ports
//$oid = 'iso.3.6.1.2.1.2.2.1.10'; //inoct
//$oid = 'iso.3.6.1.2.1.2.2.1.16'; //outoct

/* SNMP Tree Walk */
$res = snmp2_real_walk($ip,'public',$oid);
while (list($key, $data) = each($res)){
 list($attr,$int) = explode('.',substr($key,strlen($oid)+1));
 $group[$int][$attr] = $data;
}

/* SNMP Value fetch example (Switch Port Traffic In/Out) */
/*
snmp_set_valueretrieval(SNMP_VALUE_PLAIN);
$desc = snmp2_get($ip,"public","iso.3.6.1.2.1.2.2.1.2.".$port,300);
$inoct = snmp2_get($ip,"public","iso.3.6.1.2.1.2.2.1.10.".$port,300);
$outoct = snmp2_get($ip,"public","iso.3.6.1.2.1.2.2.1.16.".$port,300);
*/

?>
<pre><?php 
 print_r($res); // Raw result
// print_r($group); // Parsed Array
?></pre>


 

If you need to add a 3rd Party SSL certificate to Windows for whatever reason (Exchange, IIS, TLS, SSL, SFTP, NAP, RAS, etc.) here’s how you can go about getting one ready to use.

Of course, First you’ll need to go buy a valid certificate from your friendly neighbourhood provider.

I can recommend RapidSSL, they’re backed by GeoTrust, recognised by 99.9% of devices and are cheap as chips. Especially for wildcard domains.

Anyway, once you’ve got confirmation you can proceed with generating a Certificate Signing Request (CSR).

Read the rest of this entry »

Brew In A Bag

Someone asked me how I brew my beer. The answer being; I make my own malt extracts by mashing grains – and keep everything simple by doing it all in one pot (mash tun) using the ‘Brew in a Bag’ method.

I’m by no means an expert at this but this method makes great beer and it’s no hassle once you have the routine down.

Equipment:

1x 20L or larger Pot (preferably with temp gauge fitted)
1x Large Nylon bag
1x Cooling coil
1x 4L Bottle (or equivalent water containers)

Read the rest of this entry »

The first thing I say to anyone trying to better their understanding of photography is to first stop and consider what it is they are actually doing.

Photography = from the greek photos (light) and graphos (writing or painting).

Photography is the process of painting with light.

Whether you have a lot of light, or barely any at all; will dictate entirely the kinds of images you can produce. Understanding the light in your environment and how light works inside the camera is paramount to being able to select the right mode/settings and achieve the kind of shot you want.

Read the rest of this entry »

Follow

Get every new post delivered to your Inbox.