Friday, December 6, 2013

Built-in AngularJS Events

Thanks to Fabricio Quagliariello for grepping this list out of the angular source:


  • $locationChangeStart
  • $locationChangeSuccess
  • $routeUpdate
  • $routeChangeStart
  • $routeChangeSuccess
  • $routeChangeError
  • $destroy <- broadcast when a scope is destroyed


  • $includeContentLoaded
  • $viewContentLoaded

Monday, October 28, 2013

Adventures with Angular UI Bootstrap's paginator and ngShow/ngHide

I had a <paginator> that wasn't updating it's visibility as the scope changed. ngShow and ngHide weren't acting the way I expected.

I ran across this bug on GitHub on a <paginator>, turns out you need to reference the $parent scope. Thinking about it, it's probably because <paginator> has an isolated scope. So the original value was being copied, but never updated inside the isolated scope.

Old and Busted:
<paginator data-ng-show="isPaginated()" ...>

New Hotness:
<paginator data-ng-show="$parent.isPaginated()" ...> 

Tuesday, August 27, 2013

Back to Ubuntu for Now

I've recently installed Ubuntu 13.10 after my latest stint of running Windows (damn you Optimus) and this has been my experience. It includes some ruthless criticism for the betterment of Ubuntu and less frustration for all. I'm not picking on Ubuntu per se, I do similar improvements to Windows when that's my primary OS. These are settings for a power user, not grandma, unless grandma is a power user.

Changes I've Made

Unity Tweak Tool
I've been using Ubuntu since 6.06 LTS, so I'm I know what life was like before Unity and I dislike Unity intensely. The tweak tool makes it at least bearable, here are some changes I made.

  • Unity > Web Apps > Integration Prompts = OFF
    • It's annoying and  I don't want to integrate Amazon into my OS. Maybe this feature has potential, and I'm sure partnering with Amazon was worth some sweet cash for Canonical, but for now it's yappy junk.
    • Sidenote: Remove Canonical's plugins from your browser.
  • Unity > Additional > Keyboard Shortcuts >  Put keyboard focus on the launcher
    • Click on the shortcut and press BACKSPACE to disable it.
      • Where's the documentation for BACKSPACE as clear? Nowhere, that's where.
      • That dialog is a usability disaster.
    • Why does this default to ALT?!
  • Unity > Panel > Transparency = OFF
  • Unity > Search > Background Blur = ON
    • I disabled everything except background blur since it's hard to read without blur.
    • I used active blur since I have the horsepower.
  • Unity > Search > [Everything else] = Disabled
    • ESPECIALLY online sources, I don't want to be leaking every search to Canonical or whoever is on the other end of that. It's not their business, shiny features be damned.
    • The rest is mostly personal preference. I use the search as more of an application launcher than a real 'search', which I think of as distinct from trawling through my programs for the one I want to run. Recent apps probably wouldn't be so bad.
  • Unity > Launcher > Appearance > Transparency = Disabled
    • Yes, please suck up even more resources.
  • Window Manager > General > Desktop Magnification = OFF
    • More resource-eating crap.
  • Window Manager > General > Hardware Acceleration > Texture Quality = Fast
    • Performance over eye candy.
  • Window Manager > Workspace Settings > Workspace Switcher = ON
    • I run 2x2, I LOVE workspaces. It seems Canonical doesn't.
    • If your application is maximized, you can move it to a different workspace via the ALT+Space menu, because you can't do it with the mouse. Usability FAIL.
  • Window Manager > Window Controls > Default > Right Aligned
    • Really just preference for Windows style vs Mac style.
  • Window Manager > WIndow Controls > Show Menu Button = Enabled
    • Also accessible with ALT+Space
Disable Apport
Apport is the program crash dump reporter, unfortunately it also takes it's sweet time to compile and send a crash report. You can disable apport by setting enabled=0 in /etc/default/apport. Kill the running service with: sudo stop apport

Compiz Configuration Settings Manager
Install the compizconfig-settings-manager package and run ccsm to start the application. Search for "Unity" and to get to the meat of what sucks.

  • Disable
    • General
      • Key to show the HUD
      • Key to execute a command
      • Key to open first panel menu
    • Launcher
      • Key to start the application switcher
      • Key to start the launch application switcher in reverse
  • Set
    • Key to execute a command to Super+D
Uninstalls, for great justice
  • sudo apt-get remove --purge unity-lens-shopping unity-lens-friends unity-lens-music unity-lens-photos unity-lens-video unity-chromium-extension unity-scope-audacious unity-scope-chromiumbookmarks unity-scope-clementine unity-scope-firefoxbookmarks unity-scope-gdrive unity-scope-gmusicbrowser unity-scope-gourmet unity-scope-musique unity-scope-yelp unity-scope-zotero unity-scope-video-remote unity-scope-musicstores unity-scope-openclipart unity-scope-openweathermap unity-scope-guayadeque

Things I've Learned

  • Don't hit the close button on Skype if you have chat windows open or you can't get back to the main window. Again, the launcher sucks.

Changes to Make

I wish I knew how to quit you. No, really.

General Comments

Something I've noticed with later versions of Ubuntu is MacOS envy, which sucks, because I really don't like many of the design decisions in MacOS.

Oh god, the launcher is SO bad at trying to be smart.

Sunday, August 4, 2013


I'm taking a first stab at Heroku. Here are a few of the handy commands I've run across.

Set the default --app by setting the HEROKU_APP environment variable:
Restarting a web dyno:
heroku ps:restart web.1
Show log output. If it says "not found" it's probably lying, just run the command again.
heroku logs
Deploy a WAR:
heroku deploy:war -w <path>

Monday, May 27, 2013

RepRap Prusa Mendel Hot End Thermistor Wire Tie

While I was building my RepRap, I had the thermistor pull out of the Kapton tape on my hot end. My kit from MakerGear included some 4-stranded wire with a steel wire and nylon string inside it. I took some of the steel wire and wrapped it around the hot end, snugging the thermistor in place.

That thermistor isn't going anywhere.

Tuesday, February 26, 2013

What Sucks About Windows 8 Calendar and the Surface

We picked up a Surface RT this weekend, below is the sum of my experience trying to get the calendar app to play nicely with Google Calendar.

Until recently (and kindof even now) Google supported syncing your Google Calendar with Windows Live Calendar via ActiveSync, a proprietary, licensed Microsoft protocol. For the record, it's Google that's going out of their way here, and Microsoft that fails to support open protocols like CalDAV (calendars) and CardDAV (contacts). My complaints aren't necessarily that I can't use my Google Calendar on the Surface; it's that Microsoft doesn't support those open protocols that would enable a wide array of calendars and contacts services to work with the surface.

Let Me Count the Ways...

These are the approaches I tried that an advanced user could use to workaround this absurdity, and their abysmal results. Every single failure is within the hands of Microsoft to fix.

CalDAV in the the Calendar App: F-

I started off by trying to add a my Google Calendar private URL to the calendar app. No dice, you can only add Live, Outlook, and Google accounts; and Google is broken on the Surface.

I want to add CalDAV calendars to the Calendar app.

CalDAV in Hotmail: D+

I added a calendar subscription to Hotmail. This will let you see (and, I suspect, edit) existing events from the calendar subscription in the calendar app. Awesome... except when I go to create an event there's no way to select those calendars.

I want to be able to choose any of my calendars for new events.

CalDAV Primary Calendar in Hotmail: F-

You can only add events to the "primary" Hotmail calendar, and you can't select a CalDAV calendar as your primary.

I want to use a CalDAV calendar as my primary calendar.

CalDAV Provider App: F-

Next I went looking for an app to add CalDAV support to the calendar, again, no dice. Apparently Microsoft doesn't publish the tools needed to integrate 3rd party calendars with their calendar app.

I want to add 3rd party providers to the Calendar app.

A Poor Workaround

Right now Stacey is downloading ICS files and adding them to her calendar that way.

As far as I can tell, there's no good workaround to this absurdity. Can't use our new productivity device to integrate with our current (open) workflow? That might be a dealbreaker.

Honestly, if we can't get this working we may well take the Surface back to the store. We'll see.

All I can can say is, what the fuck Microsoft?

Friday, February 1, 2013

Integrating Jetty into NetBeans 7.2.1 with Maven, oh boy!


You'll need to change the default maven actions in the Project Properties dialog:

1. Right click on your project
2. Select Properties
3. Select Actions, it's on the left.
4. Select an action on the right to edit.

Run Project

Execute Goals

Set Properties

Debug Project

Execute Goals

Set Properties



So far I've only setup the above actions, but the process is similar for others.

Check out the "Add >" button, it's more interesting than it probably should be.


Wednesday, January 23, 2013

Netbeans 7.2.1 + Git "-/Modified" Phantoms

If you use Git and NetBeans with a project that's been developed under Windows, Linux and Mac, you're probably used to seeing this (ignore the green stuff):

Only one of those POMs were actually modified. If you diff them, nothing has changed. It can get much worse that just a few files, every file you open will potentially show up in here. From what I can tell, this seems to be related to line-endings. There are some config values you need to set, and you can go about this in at least two ways.

Per Project

Add the following to your <project>/.git/config file. You only need to do this once per Git project you checkout.
        eol = lf
        autocrlf = input


This is what I opted for, since I always want this functionality. I prefer predictability.
git config --global core.eol lf
git config --global core.autocrlf input

This seems to tell Git to leave line-endings during checkout/clone, and to use line feeds (\n) when committing.

You can read more about how Git converts line endings in the gitattributes(5) man page.

There's also a bug on NetBeans' bug tracker that says this has been fixed, but it's not in 7.2.1 which is the current release version.