A step by step walkthrough of how SSR in React works

Or “Why SSR in React is painful.” Not too long ago, I got suckered into building a site using React Serverside Rendering. The pitch was simple; the client needed an interactive site using 3d animations and stuff built with React. Unfortunately, a month in I learned that that only one page needed this level of interactivity and the rest of the page was typical CRUD stuff. Having already built most of the site using react for client-side rendering, I figured I could render the client on the server and get the best of both worlds. »

My biggest problems with NixOS

Probably a year ago today, I learned about the magic of Nix and it’s Linux distribution NixOS. In theory, NixOS did/does everything I’ve ever wanted from a Linux distribution. I say in theory because unfortunately, NixOS suffers from a very common problem within the tech world, what I’m going to call the “Day Two” problem. The “Day Two” problem, as I’m calling it here (though I’m sure it has another name) is when you’ve gotten past the “Hello World” phase of a new technology - you’ve gotten the tech demo working and you’re excited, - but then you have the uphill battle of learning the skeletons in the closet. »

You should know (about): [email protected] & Ember.Enumberable.invoke

So say you have a any array of objects in your ember app testArray = [{name: "bob the builder"}, {name: "sarah the smasher"}] > [Object, Object] Did you know that there is a ‘magic’ keyword called @each you can use to pluck properties from all your objects like this: testArray.get('@each.name') > v {_keyName: "name", _owner: v, _content: Array[2], __nextSuper: undefined, __ember1448307773263: null…} It returns a weird ember object array thing that you can convert into a normal array with toArray() like so: »

Michael Francis

Introducing: Infestation - a zero* dependency portable environment manager

Infestation is a portable environment manager currently implemented as a makefile. Infestation allows a user to install specific versions of all their favorite apps and their dot (configuration) files wherever they go regardless of host operating system or architecture or root privileges. Why? As a consultant, I’m often called in to fix clients’ server problems. When I’m responsible for building a server, I would make an ansible playbook with all the server config and store it in a shared git repo for easy reference if something needs to be fixed, but often I’m fixing servers strung together by other developers, which means spending time discovering how things are already configured. »

Michael Francis

Avoiding g-ir-scanner cache issues during compile

I was recently attempting to compile megatools 1.9.9.5 for my UbuntuNAS and ran into an issue with g-ir-scanner during the make Traceback (most recent call last): File "/usr/bin/g-ir-scanner", line 46, in <module> sys.exit(scanner_main(sys.argv)) File "/usr/lib/gobject-introspection/giscanner/scannermain.py", line 470, in scanner_main transformer = create_transformer(namespace, options) File "/usr/lib/gobject-introspection/giscanner/scannermain.py", line 337, in create_transformer accept_unprefixed=options.accept_unprefixed) File "/usr/lib/gobject-introspection/giscanner/transformer.py", line 53, in __init__ self._cachestore = CacheStore() File "/usr/lib/gobject-introspection/giscanner/cachestore.py", line 83, in __init__ self._check_cache_version() File "/usr/lib/gobject-introspection/giscanner/cachestore.py", line 103, in _check_cache_version self. »

Michael Francis

Installing MAAS on Discovery

It’s 4am local time and I can’t sleep. I’ve been tossing and turning thinking about how I’m going to crunch some “Big Data” I have on my small cluster of 3 machines (+a dedicated NAS). Ideally I’d like to deploy Mesosphere DCOS and run Spark with Scala, however Mesosphere DCOS isn’t available to the public yet outside of the “Enterprise Edition” which the sales team said they were only releasing to “Select Customers”. »

Michael Francis

Ruby Tricks I've learned

I’m not sure if this will be an constantly updated post or if I’ll just make new blog posts as I discover new tricks but here are some interesting ruby tricks I’ve recently learned anyway #partition So this is one I actually learned from elixir but I’m happy to say it’s available in ruby and javascript (via lo-dash) Say you have two groups of things and you need to separate them. »

Michael Francis

TIL Git Clean

git clean -f -d Easily cleanup unintended files in your git repo. »

Michael Francis

Manual this binding with IIFEs in Coffeescript

I recently had an issue where I wanted to access the outer scope of a function, while also using the this scope inside the function. Often in Javascript developers will do something like that = this obj.doThing(function() { that.something() }) allowing you to access the outerscope and the inner scope. In coffeescript (and ES6) this functionality can be accessed using the => (fat arrow) function obj.doThing => @something() If you look at the compiled output, coffescript builds an IIFE (Immediately invoked function expression) that looks like this »

Michael Francis

Nexus Player, buggy to the point of unusability

Limited bandwidth caused poor video quality Videos had to be controlled by a smartphone / tablet Core Experience Multiuser Management Inconsistent Search Limited Content Bugs Wifi issues Remote pairing issues Paused tracks randomly play App Crashes No soft reboot (Fixed in 5.1) After having the Chromecast for a year, I was excited to hear at Google IO 2014 that the Chromecast I had come to love would be getting a tricked out big brother that promised to solve the issues I had with the Chromecast. »

Michael Francis