Wednesday, February 24, 2016

Run your own personal cloud server (owncloud)



So what do you do when you have gigabit internet symmetric and loads of hard drive space?  You start finding ways to start using some of that capacity.  So I've been looking to setup my own cloud server to just more easily access my files in general and maybe share files with some close friends and family.  I didn't want to go through some third party and I didn't want to have to worry about any file size or space limitations.  I searched around and owncloud seems to be the most popular.  It's also free and open source.  It's also linux based.  They have a live demo on their site if you want to play around with it first.

While you can install it in windows using xampp there seems to be some limitations that way.  So I took this as an opportunity to play around with linux a bit more.  In the downloads section under the appliances tab you'll find vm images ready to run (based on ubuntu 14.04).  I used the OVA image and imported it into virtualbox.  I kept it at 2gb ram but upped the cpu to 2 cores and changed networking to bridged.

I recommend using ssh (putty) instead the virtualbox console to work in since you get copy and paste that way and don't have to install the guest additions.

Setup wasn't too bad but my linux is pretty rusty and I haven't messed with apache much.  First thing was to give it a fixed internal ip address from my router then add that ip and my domain to the trusted_domains section in:
/var/www/owncloud/config/config.php
You will have to become root (sudo -i) to get to that directory.
I like using pico/nano for my editor.

To get windows shares going you just need to install smbclient first using apt-get
sudo apt-get update
sudo apt-get install smbclient
After that just go enable the external storage app.

To get rid of the php5-apcu warning:
https://github.com/owncloud/core/issues/14386
Just uncomment the trusty-backports lines in the sources.list file and then you just use apt-get to install php5-apcu/trust-backports

Changing the default ports was slightly trickier but I got it all working and installed my own ssl certificates too to get rid of the self signed warnings.  I had to change ports because my windows iis web servier vm is already using 80 and 443.  Setup your port forward in your router and you should be good to go.

change ports in:
/etc/apache/ports.conf
/etc/apache2/sites-enabled/

installing your free startssl cert:
You'll need to make sure these lines are in /etc/apache2/sites-enabled/self-signed-ssl
SSLCertificateFile /etc/ssl/2_yourdomain.cert
SSLCertificateKeyFile /etc/ssl/yourdomain.key
SSLCertificateChainFile /etc/ssl/1_root_bundle.crt


Overall, I had fun getting this setup and so far it's been running pretty great.

Monday, February 22, 2016

Expand Your Storage Space of Your Retina Macbook Pro

One thing I really miss about the older pre Retina macbook pro's was the ability to easily upgrade memory and disk storage.  As long as you had the proper torx screwdriver you can just swap out the hard drive for a big SSD.  When I sold my old mid 2010 15" mbp for a mid 2014 15" retina mbp I opted for the 500gb ssd.  It was plenty of space until I started getting into mobile development using xamarin.  I like coding in visual studio running on windows 10 inside vmware fusion.  I was really starting to gobble up a lot of space with my windows vm.

There are a few solutions that take advantage of the built in SD card slot that when inserted it is flush with the edge of the slot and doesn't stick out.  Transcend makes the JetDrive which has the flash built in but I opted for the BASEQI aluminum microSD Adapter for MacBook Pro 15" Retina for $25.  It's basically micro sdxc to SD adapter but it's much shorter than usual.  When fully inserted it is completely flush with the rest of the macbook.  I run my finger over the slot and NOTHING sticks out.  There is a tiny groove cut into the edge of the adapter big just enough for a finger nail to get in but the idea is you just insert it and leave it.  I paired it with a 200GB Sandisk Ultra micro sdxc card for $90.  I went with this solution for the added flexibility.  Maybe you already have a micro sd card to use or maybe they will come out with a bigger or faster one in the future.

Make sure you get the right model of BASEQI that matches your model mbp.  For me it was the 504A.  Also, there are no sleep issues with this adapter.  It's properly mounted every time.

If you sync 1password with dropbox and you move your dropbox folder you will need to start over with an empty vault.  Also, make sure you quit 1password and 1password mini (click the little gear in the top right corner) before moving your dropbox folder.  

Performance was better than I expected.  Just make sure you format it in HSF+ Journaled (guid) for the best compatibility.  I had some issues with games being on the sd card when it  was exFat.  You can expect about 15MB/s write and around 90MB/s read.  Playing games off of it worked great.  I tried guild wards 2, world of warcraft, and game of thrones and they all loaded up pretty fast.  It's also a great place to sync your dropbox files too.

Highly Recommended!