MacBook, defective by design banner

title:
Put the knife down and take a green herb, dude.


descrip:

One feller's views on the state of everyday computer science & its application (and now, OTHER STUFF) who isn't rich enough to shell out for www.myfreakinfirst-andlast-name.com

Using 89% of the same design the blog had in 2001.

FOR ENTERTAINMENT PURPOSES ONLY!!!
Back-up your data and, when you bike, always wear white.
x

MarkUpDown is the best Markdown editor for professionals on Windows 10.

It includes two-pane live preview, in-app uploads to imgur for image hosting, and MultiMarkdown table support.

Features you won't find anywhere else include...

You've wasted more than $15 of your time looking for a great Markdown editor.

Stop looking. MarkUpDown is the app you're looking for.

Learn more or head over to the 'Store now!

Friday, March 29, 2013

Disable Scrolling in Windows 7 Taskbar? - Windows 7 Help Forums:

With taskbar on left, the problem is that you don't get more columns for new tabs when you drag the taskbar to the right, you just get longer tabs. This seems like a bug, or maybe it's a "feature" I don't understand...

When using taskbar on the bottom, I can get 20 tabs per row without scrolling kicking in, but have to manually drag the edge of the taskbar up to make more rows. I just had 60 separate tabs open, way more than I ever need...

He's right.  It's driving me crazy.

Taskbar(s) on left:
 Same icons open with taskbar at bottom.

Wow!  I can see all the icons without scrolling!  INCROYABLE.

Why can't I have the bottom taskbar functionality on the left?  *sigh*

But then, if Microsoft, for heaven's sake, is taking shortcuts to get things out of the door, well, does anyone really write large pieces of great code?

Labels: , ,


posted by ruffin at 3/29/2013 12:33:00 PM
0 comments
Friday, March 22, 2013

New security hole allows for Apple ID password reset using Apple's iForgot page [u]:

Just a day after Apple tightened account security by introducing two-step verification, yet another vulnerability has been exposed, one that could allow for malicious users to reset the Apple ID and iCloud passwords of others using only an email address and date of birth.

Update: Apple has pulled the "iForgot" webpage down for maintenance following reports of the vulnerability.

Labels:


posted by ruffin at 3/22/2013 09:43:00 PM
0 comments

Disable the Character Accent Menu and Enable Key Repeat in Mac OS X Lion:

defaults write -g ApplePressAndHoldEnabled -bool false

Worth remembering for later, though I've probably posted about this before. Daggum accent keys. Weird. Seems OS X should keep a list of apps (that includes Sublime Text 2) that ignores that setting.

posted by ruffin at 3/22/2013 09:23:00 AM
0 comments
Thursday, March 21, 2013

Apple looks to protect dropped iPhones by shifting their orientation mid-flight:

An Apple invention discovered on Thursday describes a system that could potentially save the most fragile components of an iPhone, such as the glass screen, by detecting when a device is falling and shifting the handset's center of mass to control its landing.

Sentience might sound like overkill, but what they're doing (or at least considering) is giving the iPhone enough smarts to know when it's in trouble and enough mobility to start defending itself. Right now, if we saw a phone that could, cat-like, always land on its "feet", we'd think it was some cheap parlor trick (since we all hang out in parlors, right?) and wonder what the trick was. That is, this is magic.

Look, there's a reason why creatures that multiply continue to exist.  Your only other option if you want to be around 100 years from now is a very long life.  We all know iPhones are planned around obsolescence, so we can forget immortality.  It's time to learn to multiply, little critters, for your own good. And then the servant becomes the master, etc etc. (with apologies to Sting).

It all starts with a little nod to movement under the auspices of self-preservation, man.

Labels:


posted by ruffin at 3/21/2013 01:24:00 PM
0 comments
Saturday, March 16, 2013

Today's fun topic to remember for later is traversing DOM with jQuery. I generally hate using the DOM as a stand-in for data -- if you're polling your DOM for input values, for instance, you're Doing It Wrong. But if you're traversing your GUI to change your GUI, well, I guess that's okay. Stupid to have a data store to mirror your doc's already existing object model. This is especially useful for dealing with events. So maybe you're listening to the focus event to see if some other widget related to that one should also be displayed. Wrap event.target into a jQuery object -- which is as easy as $(event.target) -- and get moving.

So the two players in DOM traversal with jQuery are closest (to go up) and find (to go back down). Enjoy.

(as a jsFiddle here)

<head>
        <script 
                src="//ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js" 
                type="text/javascript"
        ></script>
        <script>
                var Util = {};
                Util.logit = function(strToLog, strSource)    {
                        if (window.console)     {
                                console.log(strToLog);
                        }
                }
        </script>
</head>

<body>
    <div class="family">
        Mirror.  Razor.
        <div class="grandparentDiv">
            Grandparent
            <div class="parentDiv">
                Parent
                <div class="childDiv">
                    Child
                </div>
                <div class="siblingDiv">
                    Sibling
                </div>
            </div>
            <div class="uncleDiv">
                Uncle
                <div class="cousinDiv">
                    Cousin
                </div>
            </div>
        </div>
        <div class="greatUncleDiv">
            Great Uncle
        </div>
    </div>

    <script>
        $(".family").on("click", "div", function(event){
            // let's find our great uncle.
            var $family,
            $familyMember = $(event.target),
// http://viralpatel.net/blogs/jquery-get-text-element-without-child-element/
            strFamilyMemberText = $familyMember
                .clone()     //clone the element
                .children()  //select all the children
                .remove()    //remove all the children
                .end()       //again go back to selected element
                .text()     //get the text of element
                .trim();

            $family = $familyMember.closest(".family");
            alert(strFamilyMemberText + " found " 
                + $family.find(".greatUncleDiv").text().trim());

            event.stopPropagation(); // don't need all the ancestors firing off.
        });
    </script>                
</body>

Labels: ,


posted by ruffin at 3/16/2013 01:40:00 PM
0 comments

Apple adds encryption to App Store connections, addresses six month old hole:

At least six months after being alerted to a possible exploit in the way users connect to its App Store, Apple has added encryption to users' connections, plugging the security hole.

Not a huge deal, I don't think, but worth adding to my Apple Fail list.

Labels:


posted by ruffin at 3/16/2013 08:30:00 AM
0 comments
Wednesday, March 13, 2013

How can I download my Reader data? - Reader Help:

Google Reader will be retired on July 1, 2013. If you'd like to download a copy of all your Reader data before then, you can do so through Google Takeout. You'll receive your subscription data in an XML file, and the following information will be downloaded as JSON files:

Wait, what?  That's evil.  Really, how much overhead can this possibly be?  No explanation given.  Sad.

Labels:


posted by ruffin at 3/13/2013 08:08:00 PM
0 comments
Tuesday, March 12, 2013

There's got to be an easier, built-in way to instantiate a local date in JavaScript, right? I understand that timezones are a pain, and I see how UTC is a good way to make date instantiation easier from the browser's point of view, but, um... http://jsfiddle.net/rufwork/8Mc8Y/
/*jslint evil:true*/
/*global document*/
function getLocalDate(strDateRepresentation) {
    var dteTemp, milliUtc, milliOffset;

    dteTemp = new Date(strDateRepresentation);
    milliUtc = dteTemp.getTime();
    milliOffset = 1000 * 60 * dteTemp.getTimezoneOffset();    
    // has to be for THIS date or calc could be off -- EST vs. EDT, eg.
    // http://tinyurl.com/d5vzqj9
    // (https://developer.mozilla.org/en-US/docs/JavaScript/Reference/
    //          Global_Objects/Date/getTimezoneOffset)
    // "Daylight saving time prevents this value from being a constant 
    //          even for a given locale"

    return milliUtc + milliOffset;
}

var milliLocal = getLocalDate('2011-01-01');
document.write(milliLocal + "<br>");
document.write(new Date(milliLocal) + "<br>");

document.write("<br>");

milliLocal = getLocalDate('2013-03-01');
document.write(milliLocal + "<br>");
document.write(new Date(milliLocal) + "<br>");

Labels: ,


posted by ruffin at 3/12/2013 02:39:00 PM
0 comments
Friday, March 08, 2013

So I recently got to play around with Xilium CefGlue.  Xilium is fine, though it reminds me of when I was doing this in Visual Basic 6... it's more like the old Mozilla ActiveX control than the smooth WebBrowser control embedding IE, which is to say a little it's a little rough around the edges.  We've had much better luck getting Awesomium up and running quickly, though that's a price-lacking (so you have to negotiate) pay to play.


Setup
Anyhow, once you've downloaded the Xilium source from Bitbucket and the respective binaries from its home page (it's easiest to use the libcef.dll and friends you'll find there to run the demo apps), it's time to start hacking your own browser.
  1. Copy the contents of the CefGlue.Demo.WinForms folder into a new folder.
  2. Get rid of references to other projects.
  3. Replace those two project references with dlls.
    1. Xilium.CefGlue.dll
    2. Xilium.CefGlue.Demo.dll
    3. I've put them into a lib folder at the same level as the existing bin folder.
    4. Right-click "References" and browse to those dlls to include them in place of the other projects (Xilium.CefGlue.dll and Xilium.CefGlue.Demo.dll)
  4. Remove strong naming by UNCHECKING the box, below.
    • Error    1    Cryptographic failure while signing assembly
      'D:\Projects\chromeige\xiliumPMClient\obj\Debug\Xilium.CefGlue.Demo.WinForms.exe'
      -- 'Error reading key file
      'd:\Projects\chromeige\Xilium.CefGlue.snk'
      -- The system cannot find the file specified. '    CefGlue.Demo.WinForms
  5. Configuration Manager to x86 to match the x86 libcef.dll.

So that's about it. Voila, you're CEFing.

Again, at least with this wrapper, things are somewhat slow and rough.  That said, afaict, Steam, among others, uses at least libcef, so it's not like it's a dead end tech (are you listening, Camino?  ;^D).  So I'm suspicious it's the wrapper that's slowing things down, not libcef.

Note: I do need to follow this up a bit.  The demo "lite browser" projects for Windows Forms and gtk# are broken up into three projects.  This describes how to open up the Windows Forms project and hack it outside of the Xilium solution, but to really do much, you have to drill down into the CefGlue.Demo project that both Windows Forms and gtk# share, which this doesn't do yet.

Labels: , ,


posted by ruffin at 3/08/2013 09:13:00 AM
2 comments
Wednesday, March 06, 2013

Building WebKit.NET with Visual Studio 2010 Express: A Visual Step By Step Guide � webkitdotnet/webkitdotnet Wiki:

The fundamental building blocks of the WebKit.NET project are the libraries used to communicate between .NET and the WebKit browser. The main C# project files will not build without these.

Actually works fairly well, though I'm having some trouble with certs.

posted by ruffin at 3/06/2013 04:51:00 PM
0 comments

Support freedom
All posts can be accessed here:


Just the last year o' posts:

URLs I want to remember:
* Atari 2600 programming on your Mac
* joel on software (tip pt)
* Professional links: resume, github, paltry StackOverflow * Regular Expression Introduction (copy)
* The hex editor whose name I forget
* JSONLint to pretty-ify JSON
* Using CommonDialog in VB 6 * Free zip utils
* git repo mapped drive setup * Regex Tester
* Read the bits about the zone * Find column in sql server db by name
* Giant ASCII Textifier in Stick Figures (in Ivrit) * Quick intro to Javascript
* Don't [over-]sweat "micro-optimization" * Parsing str's in VB6
* .ToString("yyyy-MM-dd HH:mm:ss.fff", CultureInfo.InvariantCulture); (src) * Break on a Lenovo T430: Fn+Alt+B
email if ya gotta, RSS if ya wanna RSS, (?_?), ¢, & ? if you're keypadless


Powered by Blogger etree.org Curmudgeon Gamer badge
The postings on this site are [usually] my own and do not necessarily reflect the views of any employer, past or present, or other entity.