• Creating Missing Keyboard Shortcuts in Applications on Mac OS X

    Date: 2011.08.21 | Category: Apple, Tech Stuff | Response: 0

    So I’m living with Mac OS X ATM, at least until Kubuntu is fully compatible with my MacBook Air. It definitely has its niceness, but boy oh boy, is it also extremely difficult and inconsistent to work with. One thing that is really annoying is the complete disregard for how the rest of the world does keyboard shortcuts. Or even doing shortcuts in the first place. Never have I seen anyone use the mouse(pad) so much as when observing the average Mac OS X user. Working on this system out-of-the-box is such a drag, everything takes ages because standard keyboard functionality is missing (like Home, End, and Del keys), shortcuts are inconsistent – if even there, navigating a dialog without using your mouse pad is a no-go, Cmd+Tab disrespects spaces, is filled with minimized and tray apps, and creates new windows ad libitum.

    Lots of good apps are out there to fix these usability issues, but I just learned how to add keyboard shortcuts for functionality for 3rd party applications, which is a built-in feature of Mac OS X, and really, really cool. I’m sharing it here.

    Example: Aptana Studio 3 on Mac OS X supports PHP editing, but there’s no keyboard shortcut for looking up the definition for words in the language. You have to right-click, choose Commands, PHP, Documentation for Word. Not exactly great. This used to be Ctrl+F2 or something like that. But as it turns out, you can just add a shortcut yourself. Open up System Preferences > Keyboard, and choose the Keyboard Shortcuts pane. Chose Application Shortcuts in the left pane, and click the + button underneath the right pane. In the dialog choose the application you want to create a shortcut for, in this case “AptanaStudio3.app” (which you’ll probably have to find yourself – it wasn’t in the list when I did it). In the Menu Title field type in exactly (case-sensitive and all) the menu item you want to create a shortcut for, in this case “Documentation for Word”. Focus the Keyboard Shortcut field and press the keys you want to use for the shortcut. Click Add.

    Works straight away!

    I haven’t yet experienced what happens if there’s a name collision. I mean, like “New…” appearing in two different menus or something like that. So I don’t know how you would define the correct one you want in the Menu Title field. Time will tell. If you know how to do that, please leave a comment :)

  • Get Back /var/log/messages in (K)ubuntu 11.04

    Date: 2011.06.21 | Category: Linux, Tech Stuff | Response: 0

    I can’t claim to understand the reasoning behind getting rid of /var/log/messages in Natty. It’s the number one place to start looking when something goes wrong, and one of the first places people asking for community help are told to go look and report back in order to debug some situation. Either way, to right this wrong is definitely very easy, so just fire up a terminal and type:

    you@your-puter:~$ sudo nano /etc/rsyslog.d/50-default.conf

    In nano, find the commented out lines mentioning “/var/log/messages”, and uncomment them.
    Tip: Search by pressing Ctrl+W, then type in messages and press enter.

    You should be uncommenting four lines, and ending up with this:

    *.=info;*.=notice;*.=warn;
            auth,authpriv.none;
            cron,daemon.none;
            mail,news.none          -/var/log/messages

    Save it and exit (Ctrl+O, EnterCtrl+X), then restart the syslog daemon:

    you@your-puter:~$ sudo service rsyslog restart

    That’s it. /var/log/messages is back :)

  • Boosting Windows 7 File Move Performance by Up to 10,000%

    Date: 2011.05.30 | Category: Funny/Weird Things on the Net, Tech Stuff, Windows, WTFs | Response: 0

    I’m currently moving about a whole bunch of smaller files in Windows 7 (about 400,000 files). I was getting frustrated with the abysmal rate at which Windows is able to move files around. Even moving just one folder into another one causes Explorer to start “discovering” the entire source dir, which is utterly pointless in the first place as there’s just one node to consider and to relink in the MFT. One wonders why it always does that. It didn’t do so before Vista.

    Anyway – adding injury to insult, these files need to be imported in and processed by an application which is rather poorly written, making it run out of memory when it is fed much more than 4,000 files at a time. So, I have to move batches of about 4,000 files into separate folders before importing them, and to do this I have to use Explorer. The move operations, as mentioned, are incredibly slow, maxing out at 25 items per second, sometimes dropping to 5 items/sec, generally hovering at about 15 items/sec. I was wondering if the problem was the files lists in the source and target Explorer windows being continually refreshed as items were moved in and out of them, and so tried to navigate away from them, even closing the windows entire, without effect.

    Then, by accident, I discovered that if I selected a batch of files from the bottom of the list in the source window, the move operation was massively faster, running at 350-500 items/sec! That’s a performance factor of ~ 14 to 100, in other performing, compared to the previous runs, at between 1,400% and 10,000% effectiveness. Go figure!

    Not having access to the Windows source code, one can only guess at what kind of code disaster lies behind this behavior. But regardless, remembering this trick can prove very helpful when you don’t feel like spending an entire day looking a green bars very slowly moving east.

    These issues, and the effect of this trick, seem to happen according to Windows’ current mood, though. Sometimes you get to drag-and-drop a folder with 200,000 files into another folder instantly, at other times it’ll spend 30 seconds examing a 100-file folder. Similarly, sometimes (about 1 in 4 so far) the forementioned trick has no effect, and you’re looking at green bars again. Your mileage may vary ;)

  • Leaked Screenshot of Windows Server 9 Login Screen, In-UI Annotations new Design Strategy

    Date: 2011.04.19 | Category: Off the record, Tech Stuff, Windows | Response: 0

    Whoah…! Today is a great one for me as an individual, and for the Windows community as a whole.

    It’s been an amazing couple of months! Windows 7, as it seems, will soon – or sometime, anyway – be surpassed by its successor, Windows 8. This has been disclosed officially by Microsoft, discussed all over the net, and various leaks of functionality and design have been discovered and forwarded to the interwebs, mostly about the Windows 8 Login Screen.

    As anyone with half a brain knows, the most important part – feature-wise – of an operating system, and also the hardest to fake if you were to do that, is the login screen! Especially with regards to Windows, as on an average day, this is the place you’ll be spending most of your time.

    Well. Santa’s got something in his stocking for you!!! Working closely together with a close friend of mine “behind the fence” so to speak (who shall remain unnamed), I’ve acquired a great deal of info on something very astounding. Even now, months before the release of Windows 8, and years before the release of the next iteration of the Redmond series, I am in the fortunate position to be able to reveal a couple of goodies to you. For one, the successor to Windows 8 will be named “Windows 9″!!!

    Secondly, in what seems as a big-brotherly shoulderpat and comradery “get-well” gesture from Microsoft to the daredevils of Europe, the codename has an Icelandic ring to it, specifically “Eönghörn”.

    And as if that isn’t enough to get your panties shaking, I’ve even managed to acquire a leaked and very very hush-hush screenshot of the login screen of Windows 9. This is even from Windows Server 9, and shows an entirely new strategy in interface design – helping the user by using in-screen annotations, explaining all those things that are usually really hard to fathom to the average Windows Server administrator.

    These are great times, indeed, and if I were Canonical or Apple, I’d be shitting my pants! Wouldn’t you?

    Leaked Login Screen from Windows Server 9

  • Linux Users More Generous than their Paying Mac and Windows Counterparts?

    Date: 2011.04.19 | Category: Apple, Funny/Weird Things on the Net, Linux, Off the record, Windows | Response: 0

    So, the Electronic Frontier Foundation wants me to buy the “Humble Bundle” – a pay-what-you-think-is-fair financed bundle of computer games. Not only that, but you get a choice of who to pay, too.

    I went to the site and started reading – primary concern being, of course, “will it run on Linux?” I scrolled down and a pie chart caught my eye. The statistics for the previous Humble Bundle installment. An event that apparently resulted in the raising of $500,000 to EFF:

    Payment Statistics for the Humble Bundle, Show Linux Users as Being Exceptionally Generous

    Now, while Windows as a platform is the largest contributor, per user paying it’s also the smallest one, as you can see by the average purchase price by platform to the left. Actually, on average, a Linux user has coughed up about three times the amount a Windows user has. And about twice as much as the average Mac user.

    Now, why is that? Well, I’d like to think that we’re just better people, but that would be stretching it a bit ;) Either way, with more than 132,000 purchases it’s damn hard to dismiss as statistical error. Given that any PC these days is hard to get without Windows pre-installed, it’s not like we have the extra money left to spend that we didn’t use on the OS. What do you think?

  • Fixing Console (and Other) Colors in Aptana Studio 3

    Date: 2011.04.16 | Category: Development, Rails, Ruby, Tech Stuff | Response: 1

    One thing that’s both cool and quite annoying at the same time about Aptana Studio 3 is the themes system.

    Clearly, Aptana have been looking at editors like Textmate and fallen in love with the brightly colored and bold texts on a black background, and have tried to implement that in Aptana Studio 3.

    The fact of the matter though, is that it just doesn’t work very well. To being with, Eclipse which Aptana Studio is based on, isn’t very text-on-black friendly – you can’t properly style the UI elements in Eclipse themselves, so you end up at best with a halfway-there result where non-text editor elements crave your attention being far too bright. Secondly, the theming isn’t properly carried through (yet?), so while there are themes that look fairly good with regards to editing Ruby, you’ll find that HTML, CSS, Javascript, and more are poorly themed, often leaving you with mostly uncolored markup.

    While I do like Textmate’s dark style theme, I just don’t like the idea when it’s attempted to be implemented in Aptana (Eclipse). So I’ve switched to the “Aptana Studio 2.x” theme which is text-on-white and has more styling of non-ruby code, too. The problem then becomes that your terminal windows (for firing off console commands, gitting, raking and such) become text-on-white, too. And not just that, the text colors aren’t changed to accommodate the white backgrounds, either – so you get 100% on white, which is pretty much impossible to read. And adding insult to injury, there aren’t any apparent way to change the terminal and console colors using the theme editor.

    Except, there is. You just have to add the tokens yourself. For fixing the terminal colors, so that you can have text-on-black terminals in a text-on-white theme, you just need to add some tokens to the list. You add a new token by clicking the small [+] button beneath the list of styling elements when in Preferences > Aptana > Themes:

    Screenshot of the Aptana Studio themes preferences section

    As you can see, I’ve already added the tokens, they’re the ones starting with “ansi.”:

    ansi.black
    ansi.white
    ansi.gray
    ansi.magenta
    ansi.cyan
    ansi.yellow
    ansi.blue
    ansi.green
    ansi.red

     

    The full list of available tokens that can be added when missing – if you want to also add missing styles for other (markup) languages – can be found here, on the Current Theme Scopes page on the Appcelerator wiki. One thing that’s not mentioned on that page is that there’s a sort of hierarchy defined for the languages, where broadly defined tokens, such as constant.other.symbol (which isn’t even mentioned, btw.) is used where language-specific variants, such as constant.other.symbol.ruby, are missing. This makes it easier to create more generic cross-language directives using fewer keywords :)

Recent Posts

Tweets

Just Fun Shizzle

Links