Blog publishing from Dropbox

December 14, 2012

The geek inside me longs for something like http://scriptogr.am, a solution where you publish a new post just by creating a Markdown file in a folder on your Dropbox account. Your post gets automagically coverted to static HTML and published on your site.

The geek inside me longs for writing some code to accomplish the same…

Wordpress is a great platform, and I use it for several blogs. But for most of my needs I could use a simpler solution that did not require a ton of plugins to accomplish simple tasks.

Transparent ssh tunnel for Mac and PC

December 14, 2012

I use Sidestep on OSX to build an encrypted connection to a remote server of my own through when connecting to the Internet on public WiFi networks. But the latest version of SideStep does not work reliably with Mountain Lion.

TunnelBear offers an alternative, and its free for casual use (up to 500MB monthly).

Fix Templatic’s Private Lawyer text-being-truncated-on-slider bug

June 6, 2012

I was having problems with the Coda Slider in the Private Lawyer Wordpress Theme by Templatic. (The slider is called the T Anything Slider widget by the theme.) Text was being truncated even when the text length was less than the number of characters specified on the widget settings.

A small modification to the bm_better_excerpt function in wp-content/themes/PrivateLaweyer/library/functions/custom_functions.php solves the problem.

File: wp-content/themes/PrivateLaweyer/library/functions/custom_functions.php

<?php
// Excerpt length
function bm_better_excerpt($length, $ellipsis) {
$text = get_the_content();
//
// fix weird bug that caused substr to chop
// text even if $length was greater than string length
if (strlen($text) > $length) {
$text = strip_tags($text);
$text = substr($text, 0, $length);
$text = substr($text, 0, strrpos($text, " "));
$text = $text.$ellipsis;
}
return $text;
}
?>