These are my setup notes combined with a user review the Synology DS412+. We have bought this device so we: can host some websites from home with low bandwidth high storage requirements; have remote access to files etc; and have a shared drive on our LAN rather than leaving our iMacs on;
The SynBox will initially be loaded with 4x Western Digital 1TB drives that we have left over from our down graded Ubuntu server. I have completed a SmartCtl Extended Test Reports on these drives and hope despite the extended hours they will work ok for the time being.
– post in progress —
So I’ve long held back from signing into one of the free cloud resources due to concerns over privacy. I’ve used Google Docs for a few non-descripto documents but nothing more. However, having just placed an order for an iPad3, I’m looking to improve my remote working and document management. I don’t want to be dragging my laptop everywhere with me next year. There is not an iPad app for the ‘new’ Google Drive and writing Google Docs on the iPad just doesn’t work. Pages, Numbers and Keynote are all apps of notoriety for the right reasons so how can I import/export easily from this? Bottom line I can’t. Dropbox allows documents to open into Pages but not the reverse. It appears WebDav is the only option so this is how I’ve set mine up on our home Ubuntu 10.10 server.
So we’ve had need to open a couple of ports on our home-server to the real-world. Its like letting a child out in the evening for the first time alone – you’ve no idea what trouble they might get into but just hope you’ve prepared them enough.
These are my notes for when I forget what I’ve done.
The router is only forwarding HTTP and SSH traffic to the server. SSH has been locked down so it only accepts Key logins from non-root users so I think this is pretty good. The default site forwards via .htaccess to this domain which prevents general rumblings if you find it and only certain external subdomains are identified in the server’s /etc/hosts file.
Denyhosts is installed.
UFW Firewall has been configured using
sudo ufw default deny
sudo ufw allow ssh
sudo ufw allow www
sudo ufw allow 10000
sudo ufw allow 443
sudo ufw allow Samba
sudo ufw allow 5901
sudo ufw enable
Thanks to 1000Umbrellas for the above.
Apparently, its possible to use allow webmin but this didn’t seem to work in this instance.
So if you are running MAMP on your Mac and baking some CakePHP you may encounter errors when trying to run the Cake Console.
The error is likely to look something like
Warning Error: PDO::__construct():  No such file or directory (trying to connect via unix:///var/mysql/mysql.sock) in [/rootpath/lib/Cake/Model/Datasource/Database/Mysql.php, line 160]
Add the following to your database.php config file.
'unix_socket' => '/Applications/MAMP/tmp/mysql/mysql.sock'
Creating student users on Ubuntu is pretty straight forward but a little housekeeping can make life easier.
The intention for this post is to record the PHP Sanitation and Validation techniques I’ve used against various variable types for future reference. Until now I’ve always found myself digging through code to remind myself of what I did last time.
In this post I’m exploring the potential of Google’s Web Toolkit SDK and Google App Engine SDK. I’m exploring them into Eclipse 3.7 with the Google Plugin as this seems to be the recommended method.
I was asked about extracting columns or fields of data from the HadCm3 model output when there are lots of files to be dealt with and maybe you don’t want them all. This python script achieves that and places a file
fieldName.txt in the
#./ncks_extraction.py "fieldName" "InputFolder" "OutputFolder"
Cheeky Jquery fails to auto submit forms sometimes and this is due to the submit button interferring with the
I found this out when creating an autologin feature for a client. They needed to get username details from clients on their own website, check for authenticity and then if OK create an autologin token and redirect to the suppliers website via a post form.
Installing GMT Mapping tools onto Ubuntu.
Thankfully it exists as a package so you can grab it via apt-get. I suggest grabbing the tutorial and examples at the sametime.
sudo apt-get install gmt gmt-examples gmt-tutorial-pdf
In the great wisdom of Microsoft they have broken HTML Signatures in Outlook 2010. Well actually that’s not true – they’ve gone backwards 10 years. If you want to show MS your frustration go to http://fixoutlook.org.
Thankfully, developers and IT Geeks world over have sought for a working solution to some of the problems at least. This solution comes via Claudio on Fuel Your Coding.
1) Create your nice html signature file with any html editor.
2) Save it as something.html, then open the same file with MS Word
3) Within Outlook 2010, create a new signature with some name and leave the window open.
4) Go back to Word, where your signature is being displayed, copy and then paste it into the signature editing box in Outlook.
This method certainly appears correct in the email but we are still keeping fingers crossed that the email arrives the other end links and bits intact.
Probably the easiest way to develop PHP/MYSQL Applications on the Mac is to install MAMP. However, if you then want to add Java capabilities to this there is very little documentation that explains what you need to do. After much digging around its actually rather easy assuming you are using the JDBC connector – this is how.
You get the picture – your database stores Firstname and Surname but you want Full Name to appear in a drop down. The hardest part for me was finding the solution because nothing seemed to list it appropriately under Google.
Eventually I found a simple solution using virtual fields and here it is.
Moving from one version of a framework to another can be a daunting process especially when ‘living’ documentation is vague. Cake provide a general migration guide but this how I’ve had success migrating from 1.3 to 2.0 in the past.
While building a recent CakePHP solution in addition to securing my forms I needed to use some JQuery-driven Ajax calls. Although on the surface this appeared straight forward the documentation was lacking in the detail required. I wasted alot of time trying different things that didn’t work idependantly but once put together provided what I believe is a working solution. It may need some refinement over time but hopefully this will save others wasting so much time in code-wilderness.