Week roundup

Last week recap and links:
Image courtesy of kanate / FreeDigitalPhotos.net

Image courtesy of kanate / FreeDigitalPhotos.net

What are your best reads this week? Leave them in the comments below.

Posted in Uncategorized | Tagged , , , | Leave a comment

Our iceberg is melting

220px-Emperor_penguinsI’ve read a book called Our iceberg is melting. It was recommended by David Star in his Scrum fundamentals cource.

The story describes a group of penguins that are forced to change their way of living. One penguin discovers the iceberg the’re all living on is melting and informs the leaders of the group. The way the penguins handle the situation is described in Kotter’s 8-step process for leading change.

I liked the story because the writer uses my kind of humor. That it describes the process of change is a bonus.

* Image courtesy of wikipedia

References

Our iceberg is melting bookstore.
Scrum fundamentals cource on Pluralsight.

Posted in Uncategorized | Tagged , , | Leave a comment

Github 2FA from Visual Studio 2013

Tried to sync some changes to my Trello repository on Github but got prompted for my credentials. I remembered activating two-factor authentication (2FA) just recent. Would I be prompted for the one-time-password (OTP)? No, a 401 unauthorized was the answer.

A quick google search learned me what I expected; create a token for the dumb older application. This can be done on https://github.com/settings/tokens. Leave the defaults for Visual Studio 2013 to commit and pull changes.

personal_access_token_github

After you generate the token copy-and-past it into the credential dialog. Check the Remember my credentials or save the token somewhere because after you leave the page there is no way to retrieve the token itself. You can regenerate the token, but this means the old token is no longer valid. Other operations are updating the permissions or deleting the token.

Two-step authentication is becoming the standard. Tools like 1Password and Google Authenticator offer the one-time-passwords. Fallback to tokens is only temporary until all tools adapt to this new way of security.

References

Github and Visual Studio and two factor authentication</a [blogpost]
1Password, password manager with OTP
Google Authenticator, google implementation for OTP

Posted in Tooling | Tagged , , | Leave a comment

Week roundup

Last week recap and links:
Image courtesy of kanate / FreeDigitalPhotos.net

Image courtesy of kanate / FreeDigitalPhotos.net

What are your best reads this week? Leave them in the comments below.

Posted in Uncategorized | Tagged , , , , , , , | Leave a comment

WordPress facebook plugin fixed

wordpress-logo-stacked-rgb
My kids’ school has a website created in WordPress. It is maintained by a teacher and one volunteer. The position of volunteer became vacant and I offered to help.

Earlier I fixed some issues described in this post. Now it was time for the Facebook sidetab plugin. It showed a button, when pressed the panel slides in, but no Facebook page is displayed. Time to dive in.

TLDR

Facebook deprecated the Like-Box so I changed the plugin to use the Page Plugin.

PHP (again)

No, I’m not changing my profession to PHP developer. But being a developer I’m curious about other languages and solving problems. A WordPress plugin is mostly a PHP file that is included in the execution stack as is the case with the Facebook plugin.

In the Facebook developer documentation I read that the Like-Box plugin is deprecated. The best alternative is the Page Plugin. It offered a working customizable sample. I combined the new code with the existing PHP and ended up with the changes described below. Complete script for download at the end of this post.

<?php
/* Add v2.3 Facebook script */
echo '<div id="fb-root"></div>
 <script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0]; 
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.3";
  fjs.parentNode.insertBefore(js, fjs);
}(document, \'script\', \'facebook-jssdk\'));</script>';
?>

/* changed class from like-box to fb-page */
<style type="text/css">
	#be-it-sidetab .fb-page {
	    background: #<?php echo $fb_bg_color; ?>;
	  	width: <?php echo $WPlize->get_option('fb_width'); ?>px;
	  	height: <?php echo $WPlize->get_option('fb_height'); ?>px;	
	  	overflow: hidden;       
	} 
</style>

/* changed from like-box to fb-page */
<div class="fb-page" 
     data-href="<?php echo $WPlize->get_option('fb_data_href'); ?>" 
     data-width="<?php echo $WPlize->get_option('fb_width'); ?>" 
     data-height="<?php echo $WPlize->get_option('fb_height'); ?>" 
     data-hide-cover="<?php echo $WPlize->get_option('fb_show_header'); ?>"
     data-show-facepile="<?php echo $WPlize->get_option('fb_show_faces'); ?>" 
     data-show-posts="<?php echo $WPlize->get_option('fb_show_stream'); ?>">

A little note about the code above. The previous implementation used the “Show Header” option which is now used to set the “Hide Cover” option. I could negate the value …

References

Facebook page plugin developer documentation and working samples
frontend.php with all the changes. I’ve also send this to the developers at be-it.se for updating the plugin.

Posted in Tooling | Tagged , , | Leave a comment