Skip to content

Introduction

Hello! This is Jussi's notepad on things technical. You're welcome to see if there's anything to help you around.

(This text is shown with the aid of blog introduction plugin without touching the theme files.)

Corrupt SD (or other memory) card? Recover photos

21-Nov-11

"PhotoRec is file data recovery software designed to recover lost files including video, documents and archives from hard disks, CD-ROMs, and lost pictures (thus the Photo Recovery name) from digital camera memory. PhotoRec ignores the file system and goes after the underlying data, so it will still work even if your media's file system has been severely damaged or reformatted."

via PhotoRec - CGSecurity.

Add WordPress Featured Image as Automatic Facebook Like Button Image

27-Aug-11

Add the following in header.php, within the html head tag.

<?php if (has_post_thumbnail() && is_single()) { // if feat im exists && current page is single article
$thumb = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'medium' );
$thumb_url = $thumb['0'];
?>
<meta property="og:image" content="<?php echo $thumb_url; ?>" />

htaccess 301 redirect from all pages to one page

04-Apr-11

RedirectMatch permanent /.* http://www.newdomain.com/

Create Favicon (Multiresolution) on OS X

28-Feb-11

IcoMaker, it works.

"On the mac, this is a snap, thanks to Takeshi Ogihara’s IcoMaker. Head over to his page (assuming it’s a he), and look for the link at the bottom of the page, something like: “IcoMaker Distribution Package, 84KB”."

via steve cooley presents » Blog Archive » HOWTO: create a favicon.ico on Mac OS X.

Load jQuery Slideshow After Page Has Loaded

17-Feb-11

I needed a slideshow that would load (in a way, asynchronously) after the page has been loaded and would show something without JavaScript.

This solution requires jQuery and jQuery Cycle plugin (lite version will do).

<div id="slideshow">
<img src="default-image.jpg" alt="" /><!--defaults to this image without javascript -->
</div>

<script type="text/javascript">
$(document).ready(function() {
  //// random slides
  var SLIDE_COUNT = 12;
  var r = Math.floor(Math.random()*SLIDE_COUNT+1);
  var i = 1;
  $('#slideshow').empty(); // clears the slideshow contents (default image)
  for (i = 1; i <= SLIDE_COUNT; i++) {
    $('#slideshow').append('<img src="slide-' + r + '.jpg" alt="" />');
    r = (r % SLIDE_COUNT) + 1;
  }

  //// fixed slides
  //$('#slideshow').append('<img src="slide-1.jpg" alt="" />');
  //$('#slideshow').append('<img src="slide-2.jpg" alt="" />');

  $('#slideshow').cycle();
});
</script>