My Dots for Wednesday, April 25, 2007
Interesting take at sensing the location of your Mac in order to set various network settings.
Interesting take at sensing the location of your Mac in order to set various network settings.
I recently started using BlueDot’s Auto-Blog feature. It’s a nifty little tool that takes the Dots I’ve chosen (through tag filtering) and auto-posts them each night. However, I noticed that these posts were wreaking havoc on my WordPress theme(s). After quite a bit of tinkering with the code, I thought I had fixed it. Alas, it seemed like there was no pattern to the madness.
It finally dawned on me that it was not something inherently wrong with the code in the post, but because I was omitting information when I dotted a page. If I didn’t enter in a note for the Dot, the page would break. Well, I don’t want to necessarily have to enter in a note for every Dot I make, so I came up with a fix.
The fine folks over at BlueDot saw my post (auto-dotted from my blog) and made a very quick update to their auto-blogging code. This instructions in the following post should no longer be necessary. Thanks mohit!
You need to change two files in your WordPress theme:
In index.php, find the following section of code:
<div class="entry">
<?php the_content('Continue reading &raquo;'); ?>
</div>
Replace it with this:
<?php
$cat = get_the_category();
$cat = $cat[0];
$catname = $cat->cat_name;
// Grab the category name for the upcoming post
?>
<div class="entry">
<?php the_content('Continue reading &raquo;'); ?>
<?php
if ($catname == "BlueDot"){
preg_match_all("/<div class=\"bluedotNote\" \/>/m", get_the_content(), $matches);
for ($counter = 1; $counter <= sizeof($matches[0]); $counter++){
echo "</div><!-- Missing /div from bluedotNote -->";
}
}
?>
</div>
In single.php, find the following section of code:
<div class="entry">
<?php the_content('<p class="serif">Continue reading &raquo;</p>'); ?>
Replace it with this:
<?php
$cat = get_the_category();
$cat = $cat[0];
$catname = $cat->cat_name;
// Grab the category name for the upcoming post
?>
<div class="entry">
<?php the_content('<p class="serif">Continue reading &raquo;</p>'); ?>
<?php
if ($catname == "BlueDot"){
preg_match_all("/<div class=\"bluedotNote\" \/>/m", get_the_content(), $matches);
for ($counter = 1; $counter <= sizeof($matches[0]); $counter++){
echo "</div><!-- Missing /div from bluedotNote -->";
}
}
?>
Essentially, we grab the category for the entry (all my BlueDot entries are posted with a category of “BlueDot”) and check to see if we have a BlueDot post. If so, we search the post for an instance of:
<div class="bluedotNote" />
This indicates a Dot that is missing a note. If this snippet is found, the code adds an extra closing div tag in order to compensate.
This code also works with multiple Dots per entry.
Nice collection of GreaseMonkey scripts.
[tags: firefox, greasemonkey, scripts, davemorg]
Earlier today, I wrote about the fantastic bookmarklet, SuperGenPass; a great tool for generating secure, random and site-specific passwords with an additional two-clicks added to your login process. However, as noted in my previous post, two more clicks is not the ideal solution, at least not for me. I have detailed below the steps to implement a keyboard shortcut for SuperGenPass to reduce the effort down from two clicks to zero.
What you need (requirements)
.blur Replace: .focus This will ensure that no added clicks will have to be added into your login procedure (i.e., you will press your keyboard shortcut and then ‘Enter’ to login, rather than having to click the ‘Login’ button)keyconfig.main.xxx_key__SGP BOOKMARK KEYWORDmeta][\][][if(window.loadURI) loadURI(getShortcutOrURI('SGP BOOKMARK KEYWORD',{}));Next time you go to the site to login, type in your master password, execute your keyboard shortcut, and press enter. Voila!
In my never ending quest to secure my identity on the Internet, I came across an interesting bookmarklet by the name of SuperGenPass (SGP). Created by Chris Zarate, this snippet (alright, it’s a bit larger than a ’snippet’) of JavaScript allows you to generate secure, domain-specific, “random” passwords on the fly with only a few clicks.
Using your master password, this bookmarklet uses a one-way MD5 hash in order to generate a secure alpha-numeric password that will give your typical dictionary and brute-force password crackers a mighty big headache. Due to the nature of the hashing, your master password cannot be discovered by reverse engineering your generated, domain-specific password. Perhaps best of all, consistently using this ‘tool’ drastically reduces the need to remember a bevy of passwords used to access the four corners of the Internet. With additional perks such as phishing protection and over 1,000 top-level domains supported, SGP sure seems to have promise.
All of this seems fantastic, but I must admit that I am adverse to adding additional clicks to my browsing experience. Though SGP touts only two additional clicks (one for password generation and one for population), that is two clicks too many for me.
This set of instructions will demonstrate how to implement the fantastic features of SGP with the ease of a keyboard shortcut.
Great tip for those who use dual OS’s…especially over network shares.
Quoted: Dan from UneasySilence works between Windows and Mac OS a lot, and like most multi-environment users, he shares folders between his Mac and PC. However, …
This may not apply to everyone…in fact, it probably won’t apply to most.
javascript goodies
[tags: javascript, tips, design, davemorg]
Some cool, non-standard, tips for OS X.
Quoted: Tips and tricks for Mac OS X. Contains tutorials for new users, quick tips, timesaving tricks and hidden features. Tips for iLife, Finder, Mail, Safari and much more. Many simple hints for new users, but even the lifetime Mac user will find something new.