Angular 2 testing directives with events bound to document

I ran into an issue today where I was writing a test for a directive I created. The directive has a HostListener which binds to document:mouseup and the tests were not able to trigger that particular event with the typical triggerEventHandler function. There is currently a feature request to help with this issue. The workaround stated on that feature request wasn't very descriptive, so I had to figure out another way to call the bound event listener on my directive. Here's some code:

@Component({

[more...]

Crazy Bluetooth issues on Linux with Bose QC35 headphones

For a while, I simply could not get my Bose QC35 headphones to connect to my Thinkpad while running Ubuntu Linux. I had the hack some crap to get them working. I'm not quite sure why Bluetooth is still a pain in the ass on Linux, but it is by far the worst experience ever for me. I thought Apple was bad with handling Bluetooth, but Linux wanted to prove me wrong.

I actually have forgotten most of what I did, as it was over weeks of working on it that I finally got the stuff working properly. So, I will post here what I have changed and edit this post as I remember crap. I'm sure I'll need to remember how I did this in the future as well.

[more...]

External monitors with xrandr and a Lenovo Thinkpad Pro Dock

Recently, I purchased a nice new Lenovo ThinkPad T460s. Naturally, I'm running Ubuntu on it and maintaining my new venture into using the i3 window manager. One problem that I ran into with this was when docking the ThinkPad at work. I wanted to use an external monitor that was plugged into the dock. Since i3 doesn't manage things like this for you, I had to hook into some events that know when the laptop has been docked and undocked and then use xrandr to hook up the external monitor. This is how I managed to make it work. Albeit, with a few bugs...

First, you need to create a script that will handle your xrandr commands. I called this script manage-monitor.sh and I put it inside of /etc/acpi/.

[more...]

i3 window manager

Lately, a buddy of mine, joshtronic, has been getting back into the Linux world after a short hiatus using OSX. During this process, he has been trying different distributions as well as desktop environments and window managers. We both had a stint using xmonad for a while and we both really enjoyed using it. This time, he decided to try i3wm. This sort of inspired me to try it out myself as well... I figured I would make some notes on some of the things I did to get it in a usable state for myself.

The desktop

[more...]

What happens when you sit at a desk for 13 years - and actually exercise.

Update/Note After a bad fall on my mountain bike that jacked up my back and caused a broken rib, I started to exhibit back issues. My doctor and physical therapist recommend I try out a standing desk at work to see if it helped with my back fatigue that was caused by these injuries. As of this update, I have been using a standing desk for 1 week as well as doing my exercises. I will report back in a month (maybe a bit longer if time slips by) and let you know where I stand (get it? tee hee) on this issue and if my opinion has changed at all.

Me doing a handstand in 2008

[more...]

page: 1 of 3