# HG changeset patch # User Dirk Olmes # Date 1516691701 -3600 # Node ID e19bc3042ec959ac7a00dc6045f154d04477938a # Parent 101db19aa2106f47ee59cf9a286be33bcb0052b9 draft for formatting eclipse sources using a batch tool Proper blog post for chromecasting diff -r 101db19aa210 -r e19bc3042ec9 content/Eclipse/formatting-sources.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/content/Eclipse/formatting-sources.md Tue Jan 23 08:15:01 2018 +0100 @@ -0,0 +1,12 @@ +Title: Formatting Java sources with Eclipse +Date: 2017-08-04 +Lang: en +Status: draft + +All books on good code style suggest formatting your sources consistently. I found that it does not matter too much if you're in the *curly braces at the end of the line* or in the *curly braces on a new line* camp. Clean code is readable in any formatting. + +At [exentra](http://www.exentra.de) we follow this rule and since we all use Eclipse it's fairly easy: configure Eclipse's formatter, have a save action format all code on save and the basic source formatting is covered. + +But what if you don't want or cannot use Eclipse? There are stand alone code formatters out there but why learn another tool when Eclipse already does the job fairly well? It would be nice if Eclipse's code formatter could be run from the command line. As [it turns out](http://www.peterfriese.de/formatting-your-code-using-the-eclipse-code-formatter/) it's possible. And it's even [documented in the Eclipse help](https://help.eclipse.org/oxygen/index.jsp?topic=%2Forg.eclipse.jdt.doc.user%2Ftasks%2Ftasks-231.htm). + +The approaches I have cited above only work on a desktop machine, though as they require a full Eclipse installation. But what if you want your code formatted on e.g. a CI machine? There must be a way to strip down the dependencies to run the source formatter to a bare minimum. It turns out that [someone took up the task already](http://franke.ms/#/eclipse-formatter-commandline.wiki). Stefan's latest update is based on Eclipse Neon but I want one based on Eclipse Oxygen of course. \ No newline at end of file diff -r 101db19aa210 -r e19bc3042ec9 content/Linux/chromecast.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/content/Linux/chromecast.md Tue Jan 23 08:15:01 2018 +0100 @@ -0,0 +1,19 @@ +Title: Chromecasting using a custom Chromium build +Date: 2018-01-23 +Lang: en + +I'm using [Gentoo](http://www.gentoo.org) as my Linux distro of choice. Gentoo compiles everything from source giving you a maximum flexibility - but that's another story. + +At work we're traditionally an Apple shop - with some exceptions including me. We have an Apple TV device and a big TV screen in our meeting room for presentations. All of my attempts to share the Linux screen on the Apple TV device failed - studying the [unofficial AirPlay documentation](https://nto.github.io/AirPlay.html) clearly shows that this will not be an easy route to take. + +So we looked for a more cross platform screen sharing solution and came up with [Chromecast device](https://en.wikipedia.org/wiki/Chromecast) - it's a cheap device with screen sharing support built into every chrome browser. + +Screen sharing from an Apple worked out of the box. The same goes for linux - you can download the binary chrome build from google, unpack it and start casting to the device. + +Using my custom gentoo build of chromium, however I was not able to stream to the Chromecast device out of the box. After some googling I came across [a hint on the Chromecast help forum](https://productforums.google.com/d/msg/chromecast/hpwVn7E2V1M/YwsNq9UtAQAJ): + +1. Open a new tab in Chrome +1. Type `chrome://flags/#load-media-router-component-extension` into the address bar +1. Make sure the flag is enabled. If it is enabled, try disabling it, restart the browser and re-enable it + +After making this tweak the Chromecast device became available on my chromium browser and I was able to share my screen with the device.