Killing and Restarting SystemUIServer

0

Here are the quick instructions, more detail below:

Try this first. If that kills your menubar but the menubar doesn’t reappear, try this.

I use a Macbook Pro laptop for work. OS X has a program called Spotlight that lets you search your machine by a keyboard shortcut, like Quicksilver or Alfred. On occasion, this feature stops working.

The normal solutions are:

  1. open Activity Monitor, search for SystemUIServer, force quit the application
  2. open a terminal and issue: killall -KILL SystemUIServer

Normally, that will cause the program to stop – but also to restart, I’m assuming via launchctl or something similar. You’ll see the standard menubar display (date/time/power/sound/volume/etc.) disappear for an instant and immediately return.

When I tried it today, my menubar disappeared. No such restart happened. It took ages to find the fix, and when I did it was buried in a CNET article. so I’m posting here for others.

If the menu bar doesn’t reappear, do this:

  1. Copy this: /System/Library/CoreServices/
  2. Open a finder window
  3. Press shift+cmd+g
  4. Paste the above
  5. Open the app SystemUIServer.app
  6. Profit

I hope this helps. I might do a video covering this bullshit. I have yet to pin down the cause but I’m assuming it might have been caused by my system stopping after the battery died, or due to other menu bar items mucking up the environment. Not worth trying to fix now as it rarely happens, but if it does happen again I’ll go through the logs and try to solve it.

Best Trek Captain

0

Earlier tonight I posted to Facebook:

It’s going to be realllllly hard to convince me that Sisko isn’t my favorite captain. But I mean, you can try.

Rather than post my nerdgasm for the full public to read, I figured I’d do it here.

I should note this conclusion might change. I’ve watched every episode of ToS, TAS, TNG, and so far, through S5E2 of DS9. I’ve seen most of DS9 at one point or other, many/most of Voyager, and none of any Trek series after, so there’s a chance…a slim chance… but a chance.

My order is this (of the series I’ve watched enough to comment on):

  1. Sisko because he is so fucking human while also maintaining decorum of his Starfleet rank (before and after becoming a captain), his realistically portrayed relationship with his son, his command/battle skill against the Borg (and his just blame of Picard for his wife’s death and humanity’s near annihilation), and finally, what Avery Brooks masterfully brings to the character. These two links sum it up nicely: http://bit.ly/2DYUirb http://bit.ly/2DWgfqM . So many people read him wrong or in a very limited manner – the man is a marvel of humanity and of blackness - and he brought it to the screen at a time when that was rare, especially in genre television, and sci-fi nonetheless.
  2. Kirk (ToS/TAS/Films) because he is as courageous as he is cunning and unrelenting. He always puts himself in harm’s way rather than risking anyone else’s life. Spock realizes this and ***SPOILERS-ISH*** gives his own life to save crew and Kirk as a thank you for his intrepid and unequivocal friendship. And let’s face it, Shatner did an outstanding job setting the tone for his successors - don’t forget, he is Picard’s hero afterall.
  3. Janeway because she is a fucking squint *scientist* who merges and commands the dedicated crews of not one but two ships “lost in goddamn space” 75 years from home, a classic sci-fi trope expertly depicted by a gifted female lead actor – and her brilliant though controversial solution to the aforementioned problem. This problem was at the core of every Voyager episode I can recall, and it lead to both remarkable tension and incredible tenderness from Janeway/Mulgrew.
  4. Picard because he is The Perfect Human, the synthesis and epitome of past and future, who not only survived Borg assimilation but used the experience to defeat them, lived decades in a dream and came out playing a flute, owned a real saddle, mind-melded with Sarek, and is very rightly annoyed by Wesley PoFS Crusher.

Don’t get me wrong, I love The Picard, The P.Stew, Worf’s best cha’Dich. He is amazing. But. The other captains are just…better. Sure, there are polls. But numbers without context don’t mean much, and I suspect that many of those polls are targeted at 90s kids (which I am, too) whose Trek scope is TNG-heavy.

So, like I said. Good luck Archer, BabyKirk, Lorca, et. al. You have some big uniforms to fill.

Oh. And Pike doesn’t count. Nor do other non-lead captains. And if you want to whine about it, go sit on a phaser.

Frost-proof Hose Bib JB Weld Fix Failure

0

My fiancee and I bought an old house about a year ago – it will be 100 years old next year! It’s had a fair amount of updates including a somewhat comprehensive flip in 2015 that included many nice features. In the year we’ve lived here, I’ve come to realize the general workmanship on the flip leaves very much to be desired. I’m still generally happy with the house and enjoy learning and doing the work, but there’s the rub:

I didn’t realize we had a frostproof hose bib until I hooked up the garden hose and found my basement full of water. This bears some explaining.

On normal hose bibs, the valve sits close to the exterior if not entirely outside the house. Frostproof models use a longer pipe which positions the valve inside the house—where it’s much less likely to freeze. Despite this, and draining the line, enough water built up and froze inside the house (this is Wisconsin, afterall), which caused the copper hose bib pipe to burst. Because the valve was shut, there hasn’t been any draw and we didn’t have leak issues all winter. Now that Spring is here, gardening awaits. So I decided to hook up the hose, and surprise: water all over the basement! I dried it out with a couple of box fans to prevent mold issues and started researching repair options.

After some deep digging and cost comparisons, I decided to try fixing the burst pipe before taking further action. I pinched the crack shut with some pliers, used JB Weld to epoxy the crack shut, and waited for the prescribed curing time. The 3000+ PSI JB Weld rating seemed like a safe bet, but when I completed the job and ran the water, the seam split again. This time I was ready and quickly shut the interior valves.

Now it’s time to replace the hose bib with a new unit. I’m glad I tried repairing it, I learned a lot and enjoyed the process. In addition to the new unit, I’m going to install a stop and waste valve. On most models, this is basically a screw that can be loosened. When loosened, an open airway is formed between the exterior and interior of the house, allowing water to drain completely. I’m hoping this will eliminate future problems—but we’ll have to wait till next spring, afterall, the proof of a pudding is in the eating. That’s two idioms, each 400+ years old. If only our house should last so long. Wish us luck.

Set Chrome to handle mailto protocol

0

Last week I tried sharing a page using the site’s 3rd party sharing widget. This widget tried to open an email link but neither my computer nor my browser was configured for the mailto protocol, so I found a temporary workaround. Now I’ve found a real fix, so I’m documenting it.

I first tried going through the normal procedure of going to gmail.com, then in Chrome, opening: menu > settings > privacy (advanced) >content settings > handlers > allow > click “manage” button.

This should normally display a dialog window with a dropdown for various included protocols. From there, you just select the mailto option for mail.google.com, or whatever your mail server is (make sure to update the url/protocol where appropriate). Unfortunately, that setting wasn’t available when I tried, but I found this solution:

javascript:navigator.registerProtocolHandler("mailto","https://mail.google.com/mail/?extsrc=mailto&url=%s","Gmail")

To use this, copy and paste it into your address bar. Before you press enter, make sure javascript: (including the colon) is in the URL. Chrome will remove text it thinks shouldn’t be there, so if it has been removed and you don’t replace it, this won’t work.

What’s really cool is that this works for other protocols. For example, if you want to use the webcal protocol for opening google calendars, simply go to your calendar and type this into the address bar:

javascript:navigator.registerProtocolHandler("webcal","https://www.google.com/calendar/render?cid=%s","Google Calendar")

Same copy/paste caveat holds true here too. I hope this helps!

How to Thin Old Thick Plasti Dip

0

If you just want to know how to thin to reuse, please skip to the last paragraph of this page. For the story, read on. Awhile back I bought a can of Plasti Dip, mostly for experimentation, but also to coat the handles of some sculpting and modelling tools that I fashioned by gutting old pens/markers/etc. and hot gluing coat hanger/wire, etc. where the ink used to be located. These wires can be custom shaped for any purpose you can imagine – but that’s another story (post coming soon). After coating my custom-made tools, I noted that I had used about one inch (1″) of the Plasti Dip, relative to the container depth. I closed it up and put it at the back of my way-too-deep desk, where it sat unused for several months until I built my desk hutch/shelf (post coming soon, too). While loading up the shelves I opened the PD container and to my surprise, there were only a few inches of Plasti Dip remaining in the container. I flipped the can around and noted a TECH TIPS section which included information on how to thin the PD for any event, including if has thickened. Now, I will say this: The instructions on the can aren’t very helpful as far as method goes, but they do tell you that you can use VM&P Naphta, xylene (xylol) or toluene (toluol) as thinning agents. This makes sense: they’re all solvents, which basically means it will dissolve other materials, especially those for which its meant. Generally, any liquid can be a solvent – for example, water is a solvent for salt, or sugar. SAFETY WARNING: Consider this also to be a warning that I am not liable for any harm you, your friends/family or property incur, and that its your responsibility to learn more about the safe handling of hazardous materials. You’re on the internet, so please do a little research for yourself. While I can easily provide links, I cannot recommend enough the importance of reading for yourself and fully comprehending the procedures necessary to ensure safety. Warning over, moving on/ If you excite water molecules with little heat, the salt or sugar will dissolve even faster. Unlike water, however, the aforementioned solvents are very unsafe and somewhat unstable, even without heat. Do not heat them in any way because they may combust. Also, take care in where you store them; I keep the PD in my office workspace, though I should really store these in a fireproof cabinet in the basement along with other solvents and chemicals, away from sources of electricity and heat. So, how does one thin Plasti Dip once it has thickened? For me, the key moment in understanding what to do was triggered by seeing the dramatic difference in volume; over half of the PD was gone. Where could it have gone? I thought about it a bit and realized what processes were actually going on, which lead me to realize that PD is simply a solution of alcohol into which plastic has been dissolved, and like any alcohol, evaporation had taken place, reducing the volume of the solution. Here’s all you really need to do:

  1. Remember or mark where the PD level was the last time you used it.
  2. Fill with PD to this mark, and then a little bit more.
  3. Using a bamboo skewer, popsicle stick, chop stick, or other wooden or metal tool, slowly start pulling the tool through the PD, increasing its surface area, exposing the PD to more solvent. This will take some time, in some cases, perhaps even over the course of several days, as was the case for me.
  4. Stir for about 2-5 minutes at a pop – then give it about 30-60 minutes break in between. This time actually helps the solution spread evenly, kind of like letting bread dough proof, or letting pasta/pie/cookie dough sit in the fridge to let the liquid spread evenly.
  5. Repeat until PD is the consistency you desire.
  6. If you’re feeling adventurous, put a craft-dedicated egg beater in your power drill, set to low, and give it a go. Make sure you don’t use a beater that you or your housemates would use for food, even if its just you and you give it a thorough cleaning; much safer to just get an extra set at a thrift store or order replacements online.
  7. I’ve seen a lot of people on youtube do essentially the same thing but with paint mixers, for large batches intended for painting cars. The concept is the same here, just at a much smaller scale.

Of course, you can just forgo this whole process and buy a fresh can, but where’s the fun in that? Plus, if you’re like me, you probably don’t use PD very often – I try to be as frugal as possible, which is why I figured I’d share this information with others who are in a similar place.

Removing items from launchctl

2

My OSX work machine was running the fans constantly, overheating, and being a brat in general.

When anything like this happens in OSX, I run Console to see if there any errors being logged. Upon doing this, I instantly saw that postgresql was trying to launch every ten seconds, and was failing. Here are the approximate error messages; if this is happening to you, your errors will most likely be slightly different:

12/7/14 5:45:22.555 PM com.apple.launchd.peruser.501[237]: (homebrew.mxcl.postgresql) Throttling respawn: Will start in 10 seconds
12/7/14 5:45:32.572 PM com.apple.launchd.peruser.501[237]: (homebrew.mxcl.postgresql[88282]) Exited with code: 1

So, what happened? I’m not 100% certain, but I think I forgot to shut down my local rails development server before closing my terminal. No big deal – here’s how to fix it:

The part of the error that reads “com.apple.launchd.peruser.501[237]” suggests to me that launchd is controlling my machine’s postgres process(es). To verify this, let’s start up a terminal (I use iTerm2) and enter:

launchctl list

You should see a long list of results – but what is going on and what is this launchd thing you’re telling me about? [launchd wikipedia page] Regardless of what operating system you’re using, computers nowadays come with a system to manage all the invisible nitty gritty behind the scenes things associated with starting up the OS or application. Many *nix boxes use init or systemd (a hotly debated issue) – OSX uses launchd. To help users manage launchd services, launchd developers included a program called launchctl. The launchctl list command will send our terminal a list of all the running services that launchd manages. But we can do a little better. This list can be quite long, so let’s do a simple search of that list output, limiting it to lines including postgres:

launchctl list | grep postgresql

This returns:

- 1 homebrew.mxcl.postgresql

I copied the directive (homebrew.mxcl.postgresql) into the launchctl remove command:

launchctl remove homebrew.mxcl.postgresql
Et voilà, one problem fixed. I’ll eventually write up how to make this a more permanent solution, but for the time being, you can just add it to an alias in your .bash_profile like so:
alias pghb='launchctl remove homebrew.mxcl.postgresql';
 The alias name isn’t really important but I try to prefix with the name of the target process/binary/etc., and then what I’m doing with it.
 

Vi/Vim vs. Emacs

0

I must admit, I have been nerding out far too much lately. Disney vs Warner Brothers, XBOX vs PlayStation vs Nintendo., Dogs vs Cats, Star Wars vs. Star Trek; the story is all the same. There are just some things worth fighting for, at least that’s what we’re told. But the real world is a fickle one, a veritable jungle of decisions sprawling into binary pathways of one thing versus another and sometimes it’s just not that easy. But such is not the case with Vi and Emacs, at least, not for me…right now.

Here’s the thing: I hate these decisions. They never seem like decisions to me; there are clear and cut case-by-case answers, and a question left unanswered indicates to me that you shouldn’t even be part of the discussion. So, where do I stand on this?

I am of the opinion that in cases like this, there is a single question or a short set of questions that can get you to a 95+% accuracy as to what your decision should be. For Vi/Vim vs Emacs, the question is this:

Do you want a hardcore editor that you can grow with? OR do you want a hardcore platform that includings editing capacity…that you can grow with?

If your chose the first answer, you’re a Vi/Vim person. One tool for one job, let’s keep it simple, clean, and move on to other things.

If you chose the second answer, well, you’re sadistic. Emacs is an ecosystem, a task biome that has exploded into an unprecedented environment in which the most arcane tasks can be accomplished with very little effort. Sure, plugins and libraries are to be expected, but Emacs is possibly the extreme case in this regard and good on it for being so.

Personally, I’m a Vim guy when I’m not using Sublime Text 2 (yes, I’m one of those). But that’s only because I want to leave the Emacs for someday in the future when I more resemble a wizard.

Go to Top