{"id":394,"date":"2010-04-19T08:10:21","date_gmt":"2010-04-19T15:10:21","guid":{"rendered":"http:\/\/www.evardsson.com\/blog\/?p=394"},"modified":"2010-04-19T08:16:32","modified_gmt":"2010-04-19T15:16:32","slug":"i-need-a-break","status":"publish","type":"post","link":"https:\/\/www.evardsson.com\/blog\/2010\/04\/19\/i-need-a-break\/","title":{"rendered":"I need a break &#8230;"},"content":{"rendered":"<p>I don&#8217;t usually talk much about my day-to-day life here, but that doesn&#8217;t mean I never do. This is one of those times. If you just want more tech talk check out the end of this post. The rest is all me whinging anyway. ;)<\/p>\n<p>I need a break. A real break. I mean, I am technically on a break right now from school but it doesn&#8217;t really feel that way. I finished out my first year of school a couple weeks ago (26 years after graduating from high school, no less) and I thought &#8220;wow, I have an entire month that I can use to rest, catch up on some personal stuff, maybe clean out the garage &#8230;.&#8221; Unfortunately it is not turning out that way.<\/p>\n<p>Instead I am writing this at 5:54 in the morning as this has been the first chance I have had to pay any attention at all to the blog. So what has been keeping me busy? Well, first, there is work. I did use a little of what would have been study time to modify the script I use to generate weekly work reports from <a href=\"http:\/\/trac.edgewall.org\/\">Trac<\/a> so that it now shows the amount of change for hours on each ticket (which is set in a &#8220;custom&#8221; field). And holy cow, I put in 58.5 hours last week. At least 8 of that doesn&#8217;t really count, though. I messed my back up and spent some time trying to work while under the influence of <a href=\"http:\/\/en.wikipedia.org\/wiki\/Cyclobenzaprine\">cyclobenzaprine<\/a> which means that I wrote, scrapped and rewrote one class method at least 6 times before finally giving up. (Programming and drugs that make you stupid don&#8217;t mix!)<\/p>\n<p>Aside from work I have been putting some time into a project for a non-profit that is kicking off on May 12th. I&#8217;m not allowed to say too much about it ahead of launch, but I can say that it is about raising awareness about <a href=\"http:\/\/www.wpinstitute.org\/patient\/patient_faqs.html\">ME\/CFS<\/a> and how badly it has been <a href=\"http:\/\/oslersweb.com\/work3.htm\">mismanaged and patients marginalized for the past 25 years<\/a>.<\/p>\n<p>Finally, I upgraded the WordPress plugin <a href=\"http:\/\/www.samuelaguilera.com\/archivo\/shorten2ping-notifies-pingfm-bitly.xhtml\">Shorten2Ping<\/a> which I will continue to pimp as long as it keeps working so well. Of course I like my post tweets to have some hashtag love, so I do a little editing of the shorten2ping.php.<\/p>\n<p>Here is a diff:<\/p>\n<pre>--- shorten2ping\/shorten2ping.php       2010-04-12 10:22:34.000000000 -0700\r\n+++ shorten2ping.mine\/shorten2ping.php  2010-04-19 06:47:58.000000000 -0700\r\n@@ -119,6 +119,15 @@\r\n     $post_url = get_permalink($post_id);\r\n     $post_title = strip_tags($post-&gt;post_title);\r\n\r\n+               \/\/ add some tag bits here\r\n+               $tags = wp_get_post_tags($post_id);\r\n+               $my_tag_list = '';\r\n+               if (is_array($tags)) {\r\n+                       foreach ($tags as $j=&gt;$tag) {\r\n+                               $my_tag_list .= '#'.$tag-&gt;slug.' ';\r\n+                       }\r\n+               }\r\n+\r\n     $short_url_exists = get_post_meta($post_id, 'short_url', true);\r\n\r\n              if (empty($short_url_exists)) {\r\n@@ -205,9 +214,19 @@\r\n\r\n             \/\/get message from settings and process title and link\r\n             $message = $s2p_options['message'];\r\n+                                               $message_bare_char_count = strlen(str_replace(array('[title]','[link]','[tags]'), '', $message));\r\n+                                               $title_count = strlen($post_title);\r\n+                                               $link_count = strlen($short_url);\r\n+                                               $tag_count = strlen($my_tag_list);\r\n+                                               $over = $message_bare_count + $title_count + $link_count + $tag_count - 140;\r\n+                                               if ($over &gt; 0 &amp;&amp; $over &lt;= $post_title\/2) {\r\n+                                                       \/\/ if the overage is more than half the post title then skip it and let tags get truncated\r\n+                                                       $post_title = substr($post_title, 0, $title_count - $over);\r\n+                                               }\r\n             $message = str_replace('[title]', $post_title, $message);\r\n                              $message = str_replace('[link]', $short_url, $message);\r\n-\r\n+                                               $message = str_replace('[tags]', $my_tag_list, $message);\r\n+\r\n             if ($s2p_options['ping_service'] == 'pingfm'){\r\n\r\n                send_pingfm($pingfm_user_key,$post_id,$message);\r\n<\/pre>\n<p>(You can <a href=\"http:\/\/www.evardsson.com\/files\/s2ping-1.4.2.diff.txt\">download the diff<\/a> as well.)<\/p>\n<p>Ooops! Draft Saved at 6:23:27 am. And it is now 8:10, and this would still be a draft if I wasn&#8217;t closing browser tabs.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I don&#8217;t usually talk much about my day-to-day life here, but that doesn&#8217;t mean I never do. This is one of those times. If you just want more tech talk check out the end of &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[62,90,60],"tags":[197],"class_list":["post-394","post","type-post","status-publish","format-standard","hentry","category-home","category-school","category-wordpress","tag-wordpress"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pxT7i-6m","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.evardsson.com\/blog\/wp-json\/wp\/v2\/posts\/394","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.evardsson.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.evardsson.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.evardsson.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.evardsson.com\/blog\/wp-json\/wp\/v2\/comments?post=394"}],"version-history":[{"count":4,"href":"https:\/\/www.evardsson.com\/blog\/wp-json\/wp\/v2\/posts\/394\/revisions"}],"predecessor-version":[{"id":396,"href":"https:\/\/www.evardsson.com\/blog\/wp-json\/wp\/v2\/posts\/394\/revisions\/396"}],"wp:attachment":[{"href":"https:\/\/www.evardsson.com\/blog\/wp-json\/wp\/v2\/media?parent=394"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.evardsson.com\/blog\/wp-json\/wp\/v2\/categories?post=394"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.evardsson.com\/blog\/wp-json\/wp\/v2\/tags?post=394"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}