Mac OS 10.2.2 SSH Keys Passphrase Help

If you are like me and a few days ago – noticed that you were getting prompted for your passphrase when using your SSH keys (instead of using the keychain) – here is how you can make a small change to no longer enter your password each time: http://apple.stackexchange.com/questions/254468/macos-sierra-doesn-t-seem-to-remember-ssh-keys-between-reboots/264974#264974

Fun Recent Finds

Over the last few weeks I have found some really cool things I wanted to share…

  • Architectural Artifacts. If I could – my entire home would be comprised of things from this place. Urban Remains
  • Bracelets. If you know me – you are you know I would only post something about jewelry if I really thought it was something special. For those of you who do not know me – I am not a jewelry person at all – but these might make me one: Spectrum Bracelet Rainbow
  • TV show. If you have HBO and you have not seen this yet – take an hour today and give it a shot: The Night Of
  • Podcast. I first heard Claude VonStroke almost ten years ago and his podcast is still one of my favorite today. Claude VonStroke presents The Birdhouse
  • YouTube channel. I am not sure how – but I get sucked in every time with: Oddly Satisfying Videos

Add Bootstrap Button Classes to the WordPress Comment Form

Looking to stylize that WordPress comment button on the WordPress comment form? Adding the correct classes needed to the comment form button are as easy as finding where comment_form() is called in your theme. In my cases – this is within the comments.php file.

Once you find that – you just need to change
comment_form()
to:

$args = array(
'class_submit' => 'btn btn-default',
);
comment_form($args )

There are a number of modifications you can make to the comment form (changing button text, changing labels, adding notes, etc that you can make with the comment_form() function which are worth looking at here: https://codex.wordpress.org/Function_Reference/comment_form

Add Bootstrap Classes to WordPress Widgets

When creating your Bootstrap WordPress themes, you will notice the sidebar widgets (archives, categories, etc) which use dropdowns do not share the Bootstrap styling because there is no place easily accessible to add in the needed classes or CSS.

Considering the options – here are two ways you can turn those default selects into something that matches the rest of your beautiful Bootstrap site.

Add a filter in your functions.php file

This is specific to the category dropdown. I was hoping we could use the same on the widget_categories_dropdown_args filter, but that is not possible as of WordPress 4.6. (see next example to address this). This filter works great if you use the categories widget and no other that display a select.

/**
 * Add CSS class to sidebar category selects.
 */
add_filter( 'widget_categories_dropdown_args', 'lucidity_widget_categories_dropdown_args' );
function lucidity_widget_categories_dropdown_args( $args ) {
    if ( array_key_exists( 'class', $args ) ) {
        $args['class'] .= ' form-control';
    } else {
        $args['class'] = 'form-control';
    }
    return $args;
}

Add some Bootstrap CSS to your style.css file

This works great if you have multiple selects displayed within your widgets. Note: the sidebar in the example has an ID of “sidebar”. This CSS is brought over from the Bootstrap .form-control style.

#sidebar .widget select {
display: block;
width: 100%;
height: 34px;
padding: 6px 12px;
font-size: 14px;
line-height: 1.42857143;
color: #555;
background-color: #fff;
background-image: none;
border: 1px solid #ccc;
border-radius: 4px;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
-webkit-transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s;
-o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
}

I hope this helps make your site a bit more cohesive with the Bootstrap styles!

A Little Clean Up Goes a Long Way

Sure – the app/theme/plugin you created a few months ago works, but I bet there have been updates or improvements or even optimizations that could make it better. For this reason, each year I like to take a month and do some general “spring cleaning” to most of my active projects in order to make sure things are kept up. For me – January is the month to take care of this.

I generally try to do the following:

  1. Verify backups
  2. Look for any unused code and remove it
  3. Look at ways to simplify any complex code (now that you have had some time to step away from the code/re-evaluate things)
  4. Look for updates to javascript plugins/frameworks
  5. Add any filtering/escaping if it is not present
  6. Look any software and make sure to update anything marked as “not supported” (due to end of life) gets upgraded

All the items above will make projects easier to maintain and more enjoyable to work with over time. Think of this like car maintenance. Sure – your car can run without maintenance – but it will run better/longer with it.

TiVo Bolt

TiVo Bolt

I have been a faithful TiVo fan for well over ten years now. I have had my share of different versions and I have to say – no version has been more impressive than their latest release – the TiVo Bolt. It is responsive (really really fast), it allows you to skip entire commercial breaks with the press of one button, it makes recording your favorite shows easy (as expected), and makes me once again super excited about TiVo (vs. only excited with the older model I had prior). Of course there are a number of other features that now seem standard to me because I have been a TiVo person for a long time.

If you use your cable provide DVR – you are selling yourself short. The Bolt comes with one year of TiVo service included, a user interface which beats anything I have ever seen, as well as makes finding shows to watch enjoyable. Did I mention you can skip entire commercial breaks with the press of one button? 😉

Great work on the latest release TiVo! If you have ever considered moving to TiVo – this is the model to finally buy.

Internet Arcade

arcade
When I was a kid in the 1980s/1990s – there was not too many things I wanted to do more than go to an arcade to play my favorite games (Afterburner/Space Harrier to name a few). Recently I came across the “Internet Arcade” and love it! Finally I can play Qbert again too!

The Internet Arcade is a web-based library of arcade (coin-operated) video games from the 1970s through to the 1990s, emulated in JSMAME, part of the JSMESS software package.

If you are an old school gamer like me – check it out!

Find Large Files in *NIX

I recently ran into an issue where backups for a project were taking much more space than I thought they should. I figured there was a large error log somewhere – and sure enough I was able to easily find it with the following command:


du -sh *

That command du (disk usage) along with the options -sh (s = summarize, h = human readable) will then output something like this:

7.9M	admin
700K	api
1.4G	delivery
4.0K	error_log
44K	images
4.0K	index.php
4.0K	robots.txt

From there I can then see that the big disk space hog is in the “delivery” directory. Running the command then within that directory then showed there was a huge 1.4G error log which needed addressed.

This command is very useful and will save a lot of time if you run into a similar situation as I did.

Best End of Day Ritual

I found that I am most productive within the first 2 hours of each work day so at the end of each day I like to make sure I am set up for a successful tomorrow.

One of most helpful things I have found over the past few years is to make a list for everything I need to accomplish for the next day. How to keep it real? I only use Post-It notes to make sure my list is reasonable and something I can accomplish.

It is surprisingly satisfactory to cross things off the list. When things are really crazy – lists help keep priorities in line as well.

Feeling stressed or overwhelmed in the AM? Try grabbing a Post-It note and making a reasonable list!