New blog!

3/12/2009

No no. I’m not about to start a kerfuffle about changing the location and / or name of my blog again. I just wanted to make sure you’ve heard about the new ria.creuna.com site.

Basically me and the other RIA-developers broke out and started our own blog. If you like the code, geek and tech content from this site you should be sure to check it out. For example you could start with my huge post about URL Recognition, or you could read how my co-worker exposes the clickTAG sham for the lousy stinky piece of bad stuff it is.

No Comments

Experiment concluded

19/12/2008

back-to-the-future222 If you read this post, or maybe the FAQ on the about-page you probably know that the blog you’re reading is one of a triumvirate consisting of Parallax Denigrate dealing with tech stuff, Sleep Furiously dealing with mental hygiene and United States of Martin which collected the posts from the two in one “catch-all” site.

This took some effort to get to work properly, which has the effect on me that I get even more hell-bent on getting it done. And I succeeded with my endeavor if nothing else. However, the idea was flawed in its nature. First off; Separating content like this is what categories are for. Secondly; I never really wrote enough on Sleep Furiously for it to warrant a blog of its own. Thirdly; The maintenance needed to keep this project afloat was arduous. Whenever I wanted to update WordPress that became a substantial pain in the ass and I’m OCD enough that it really bugs me to see that “WordPress ‘better version than yours’ is out. Please upgrade.” every time I log in.

In short; it was fun but now it’s over. This means that If you were reading the Sleep Furiously or United States of Martin feeds you will need to change those to the feed from Parallax Denigrate.

So far the blog is mainly about coding and such, but there will be a category more resembling the posts at Sleep Furiously for whenever I do get around to writing about that part of my life.

I’m sure this won’t affect many of you, but again: This is the last post you’ll see on Sleep Furiously and United States of Martin. Those domains will be put to better use in the future.

That is all.

No Comments

TextMate theme-switcher script

10/09/2008
Summary: In which Martin ponders solutions on how to quickly switch themes in TextMate and comes up with a half-assed AppleScript / TM Command solution. Jump to the half-assed solution.

Edit: As these things usually go I had a bit of a revelation just minutes after posting this post. Completely by accident I typed the keystroke ⇧-⌃-⌥-T, which of course is mapped to the “Select Theme” – command in the Experimental Bundle and which I had completely and utterly purged from my mind. I’m pretty sure you want to use that solution rather than the one I outline in this post, but I’ll keep this around for posterity’s sake anyway. Original post follows.


I’m about to start teaching a 5 week class in ActionScript 3 and if there’s any possible way to avoid it, I won’t spend much time in the IDE code editor, because frankly; It sucks. So in order to make the differences between what the students will see on the screen (You guessed it. TextMate.) and what they’ll be working in themselves, at least initially, I played around with one of the themes in TextMate to make it look more like the Flash IDE editor.

From my beloved Twilight theme:
Tm Theme Twilight

To this IDE clone based on IDLE:
Tm Theme Idle

So since I’ll keep using my main theme for all my professional work I wanted a fast way of switching between the two themes (I’ll do a lot of work to save myself from dealing with a drop down menu). A bit of googling (actually a fair bit of googling) turned up this gem from a spanish speaking TextMate google group. Now, before you even start; Yes I feel slightly dirty about GUI-scripting as well. Making a script that simulates clicks rather than one that just tells the OS to perform whatever task associated with said click just feels wrong. But since not even a journeyman when it comes to the arcane arts of programming TextMate I’m just going to bite the bullet until someone (you?) comes up with a better solution.

Read the rest of this article »

1 Comment

Show / Hide Window

6/08/2008

I’ve been using Yojimbo, for a long while now but Eystein has been pestering me to give Evernote a shot. Common for both of these is that you don’t want to spend any time when you’re dropping stuff into them. I want one key that’ll toggle the visibility of the app. I want to hit my hotkey, dump stuff in, hit my hotkey again and continue what I was doing. Of course, neither of these apps come with that functionality (Well. Yojimbo does come with a “Quick input”-window, but for some reason I never got to loving it.) so here’s an AppleScript to fix that.

Just change the name in the script to whatever app you want to target, create a Quicksilver trigger for it and Bob’s your uncle.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
on run
  tell application "Finder" to set en to name of first ¬
                        process whose frontmost is true
  if en = "Evernote" then
    tell application "System Events" to set visible ¬
                of process "Evernote" to false
    set notHidden to false
  else
    tell application "System Events" to set visible ¬
                of process "Evernote" to true
    activate application "Evernote"
    set notHidden to true
  end if
end run

I’m really enjoying messing around with AppleScript these last few days. For such a light-weight language the benefits of it commanding the OS are huge.

No Comments