Friday, 28 April 2017

Android tablet as second monitor on Ubuntu 16.04

Do you want to connect your tablet or mobile phone to your Linux desktop as a second monitor?

Apparently, nobody took this seriously.
So I decided to create a script that configures your X11 server and creates a VNC server automatically.

Yes, is working!
I am using Ubuntu 16.04 and an Android tablet.
It should work for both iOS and Android or any other device capable of running a VNC client.
It can do both landscape and portrait mode.

For androidians, it can also connect to your device through USB!


Let me know how it goes...

Thursday, 13 April 2017

TDD with React, couple of tutorials from semaphoreci community

https://semaphoreci.com/community/tutorials/testing-react-components-with-enzyme-and-mocha

Some notes...

Enzyme gives us several ways to render components for testing: using shallowmount, and static

shallow ... is used to isolate one component for testing and ensure child components do not affect assertions. 
You can think of it as rendering "just" the component you want it to.

mount is "real" rendering that will actually render your component into a browser environment. If you are creating full React components (and not just stateless components), you will want to use mount to do testing on the lifecycle methods of your component. We are using jsdom to accomplish rendering in a browser-like environment, but you could just as easily run it in a browser of your choosing.

static ... is used for analyzing the actual HTML output of a component