How to connect to Nextcloud using Webdav flysystem and laravel

Ok…. title of this post is a tad specific but I have wasted so much time trying to piece all together all the elements of this short post that I thought it will be probably useful for a few other people out there.

 

so what are we talking about anyway.

On one side of the ring we have Nextcloud – the evolution of owncloud, forked by its own founder to ensure this project remain opensource forever (full story here).

Nextcloud allow external app to connect to its API using Webdav, a good old reliable standard.


And on the other side, we have a filesystem abstraction for PHP, named Flysystem, which is super dope and deal with all kind of filesystem with a unified API, and that’s great.

Then we have Laravel the flexible PHP framework, which has a pretty good community of users.

There is a Laravel package for Flysystem, it was made by Graham Campbell and it’s available on Github here.

So, what you do, in your laravel project, you install first Graham Campbell package, as described on the Readme:


$ composer require graham-campbell/flysystem
$ php artisan vendor:publish

The in the config/flysystem.php you edit the connector with your cloud URL (just the nexcloud root install – without the remote.php/webdav etc.)

 

And then in your controller, there you need to specify the remote.php/webdav/


return Flysystem::connection('webdav')->listContents('remote.php/webdav/');

 

and that’s it.

 

(of course, don’t forget to call for

use GrahamCampbell\Flysystem\Facades\Flysystem;

in your controller, but this was kinda documented anyway).

 

so that’s it.

 

Thanks to Gert for the tip on Github here.

 

 

Vuejs and jquery – a digest


TL;DR:

Really, vuejs could totally replace jquery if it wasn’t for some of jquery plugins. But really as time goes, I am sure we can expect it will come.

Comparing vuejs and jquery


Replace jquery with VueJS

If you are not that much of a jquery person anyway, this article should be a good intro for you : A Vue.js introduction for people who know just enough jQuery to get by


When money isn’t real: the $10,000 experiment

 

 

Adam Carroll talks about his $10,000 Monopoly game with his kids and how to teach finance management in a cashless society. Adam Carroll is quickly being recognized as one of the top transformational trainers in the country. Having presented at over 500 colleges and Universities nationwide, hundreds of leadership symposiums, and countless local and regional organizations, Adam Carroll’s message of Building A Bigger Life, Not a Bigger Lifestyle has been heard by over 200,000+ people. In early 2014, Adam successfully crowd-funded a documentary on student loan debt, raising nearly $70,000 in 45 days. The film, Broke Busted & Disgusted is due out in early 2015 and is already garnering critical acclaim. The mission of the film is to start a national debate about changing the way we fund college and not crippling 20 somethings with mountains of debt. Adam’s core message is we are all after the same thing – to relentlessly pursue our passions, live simply and happily, and make a difference to those around us.

Camera basics – ISO – Aperture – Shutter speed

Shutter Speed

The time the shutter is open to expose light into the sensor.

Typically measured in fractions of a second.

Slow shutter speeds means more light into the sensor

Examples of shutter speeds: 1/15 (1/15th of a second), 1/30, 1/60, 1/125.

Aperture

How big the hole of  the lens is open.

The larger the hole, the more light.

Aperture also controls the depth of field.

Small aperture = large depth of field

Large  aperture = Small depth of field

Typically expressed in “f” numbers (for “focal ratio”)

Examples of f-numbers are: f/1.4, f/2.0, f/2.8, f/4.0, f/5.6

ISO

Artificially brighten your photos

Measured in numbers (no kidding 😉 )

Low number -> dark image

Higher numbers -> brighter image.

Con: as the ISO rises, so does the noise in your images.

Examples of ISO: 100, 200, 400, 800, 1600.