Author Archives: Kevin

Backson Plush Toy

Backson Plush Toy

If you’re reading this you probably already know what the Backson is. If so, skip ahead, if not read on. The Backson is a character from the Winne the Pooh 2011 movie. Watch this quick clip of Owl describing/making up the Backson.

Spoiler alert: In the end we find out the Backson is ‘real’ and a huge sweet heart.

With that out of the way, my 6 year old daughter really loves Winnie the Pooh & plush toys. We call them Stuffies. She’s got her Winnie. She’s got her Piglet. She’s got her Eeyore. She would like a whole set, and maybe someday she will have it.

One character that isn’t commercially available is the Backson. I thought I would try my hand at making a custom version.

I examined my reference material and prepared a pattern that looked about right.

Printable Backson Pattern

One thing I didn’t account for in the pattern is how much the fleece I bought stretches in one direction. I assumed there would be stretch but, I thought it would be a little more all direction and not as stretchy. The actual combination was different than I expected. In the end, this didn’t ruin the project. I will be more aware next time.

I did a combination of machine and hand sewing. Both have their benefits and drawbacks.

Overall, I’m happy with the result and my daughter loves it. I hope this sparks some creativity with you. Please share your creations!

Get a URL from a Google Sheets Cell with a Custom Function

I bet you tried searching for a Google Sheets custom function that returns the URL or Link from a rich text cell. The top search result looks like it works. However it requires the parent cell to use =hyperlink(). This won’t work for us. If you push a little deeper, you’ll find user Will in RVA post a solution. This works but is cumbersome because it requires you to have a helper cell.

I took the best of both worlds and made a function that does what you really want it to do. It extracts the link URL directly from a rich text cell in Google Sheets. Go to Tools > Script editor and copy this script. Save and Enjoy!

/** 
 * Returns the URL from a rich text cell.
 * @param {A1}  reference Cell reference
 * @customfunction
 */
function linkyURL(reference){
 var sheet = SpreadsheetApp.getActiveSheet();
  var formula = SpreadsheetApp.getActiveRange().getFormula();
  var args = formula.match(/=\w+\((.*)\)/i);
  try {
    var range = sheet.getRange(args[1]);
  }
  catch(e) {
    throw new Error(args[1] + ' is not a valid range');
  }
   var cell = range; 
  var cellValue = cell.getRichTextValue();
  var cellText = cell.getValue();
  var theThing = cellValue.getLinkUrl();
  if (theThing == null){
    return cellText;
  } else {
    return theThing; 
  }
}

If this helps you out please share and let me know.

How To set AutoCAD Text Width Factor with Script

So, you’re writing a script for AutoCAD and you’re going to write some text. That’s great, you know how to do it. Even if you don’t you can follow along in the command line and figure it out.

Now, what if you wanted to control the Width Factor, or back it upside down or backwards? This is under the STYLE command. Once you know that It’s relatively simple to follow along in the command line but I’ll enumerate here.

-style Font Style Height WidthFactor Angle Backwards UpsideDown Vertical
To write some Standard text at the origin, with 80% width factor I would use it like this.

-style Standard Simplex 0.125 0.8 0 N N N
;Set the Style
-text 0,0,0 .125 0 Hello World
;Write your text
-style Standard Simplex 0.125 1 0 N N N
;Good practice to set the style back

I hope this has helped you. Good luck in your efforts!

Changing the order of AutoCAD Block Attributes

I ran into an issue at work that took me a while to solve. Here is my solution.

I created some custom Blocks in AutoCAD with several Attribute fields. I decided to reorder them but found the process unintuitive and even web searching didn’t help much. After I figured out how to do it I slept and forgot again. In order to remember I am writing it down and sharing it with you.

I am using Autodesk AutoCAD 2018 but I expect most versions will have a similar solution.

  • Open the block you wish to revise
  • From the Insert tab Select Block Editor, double-click on
  • Type command BATTORDER
  • Make changes as desired
  • Select Close Block Editor, confirm Save the changes to <Current Drawing>
  • Save file.

If you know of a simpler way I would love to hear about it.

Recover Audacity project from .au data files

In this post I tell you how to recover an Audacity project from the data files when all feels lost.

Quick introduction. Audacity is a free, open source audio recording program. It  works well and has useful features. The way it works, similar to other software, is while recording it saves a file every 6 seconds to keep from generating a giant audio file in memory. These are .au files.

Then, the program saves a .aup file which is essentially a playlist for the software to know which order to replay those files. There is a little more but that’s the basic idea.

If, for some reason, the .aup file fails to save you will feel despondent and helpless. Especially if you recorded an hour and a half interview that now appears to be completely lost. A search online for help in solving your problem will not leave you feeling better, unless you came here first.

For some reason, Audacity does not save the .au files with sequential filenames, they are random. This is a problem if you need to put them back in order. Note to developers, please change this.

For this solution I am using Audacity 2.1.xx. Navigate to the folder location for the project. Inside you should find a series of numbered folders each with approximately 256 .au files. Starting with the first sub-folder, follow these steps.

    1. Sort the folder by date created
    2. Rename so that files are sequentially named, either with bulk rename and brute force or with PowerShell or similar bulk renaming tool.
    3. In Audacity File–>Import–>Audio–> Select all the files (Do this in batches, limit to under 1000, preferable the 256 that Audacity separates folders into)
    4. Wait while it churns
    5. Ctrl+A to select all the tracks
    6. Tracks–>Align Tracks–>Align End to End
    7. Ctrl+A to select all the tracks
    8. Tracks–>Mix–>Mix and render
    9. Wait while it churns
    10. Export WAV or MP3 (name this after it’s folder so you know what order they go in)
    11. Repeat for each sub-folder

Combine these into a new file with the same Align/Mix actions as before and export as your filetype of choice.

I hope that this has helped even just one person. Have a great day!

Bookmarklets

I’m a big fan of using Bookmarklets. These little bits of code make some tedious tasks easier. I posted a few of my favorites here but I have a new one to add.

javascript:void(window.open('http://fakespot.com/analyze?utf8=' + encodeURIComponent('✓') + '&url=' + encodeURIComponent(location.href) + '&commit=Analyze'))

This one checks Amazon reviews at FakeSpot.com to give you a sense if that average 4.5 star rating on a questionable buy is from real people or likely to be paid reviews.

 

WordPress Featured Image

I wanted to modify the way WordPress was displaying my featured image for posts. The desired function is the image shown thumbnail size, to the right on the main page or search results and be a link to the post page. Then, on the post page, remain thumbnail sized and be a link to the full size image. To do this I edit content.php in two places. First, comment out the thumbnail code around line 20 and insert the below code directly after. You will have to repeat this after updating WordPress because this file is overwritten.
<!--Moved Featured Image Start-->

<!–Remember to comment out thumbnail above–>

<a href=”
<?php
if ( is_home() ) {
// This is the blog posts index
the_permalink();
} else {
// This is not the blog posts index
if ( has_post_thumbnail() ) {
$full_image_url = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), ‘full’ );
echo $full_image_url[0] . ‘” title=”‘ . the_title_attribute( ‘echo=0’ );
//echo get_the_post_thumbnail( $post->ID, ‘medium’ );
}
}
?>
“>

<?php if ( ! post_password_required() && ! is_attachment() ) :
the_post_thumbnail(‘thumb’);
endif; ?></a>
<!–Moved Featured Image End–>