Archive

Author Archive

Drobo FS: Automatic UNprotection for your data?

So right in the middle of doing absolutely nothing, my Drobo FS suddenly decides that my data is unprotected!?

No data was being written to or read from the Drobo at the time, why the hell would it, out of the blue, suddenly crap out and have all the data unprotected? No disks are faulty, so what reason could it possible have? And 12+ hours to re-sync the discs (I assume that is what it’s doing)?

What point is there to an “intelligent” data storage device that automatically protects my data, when it does crap like that?

So far, if I ever have to buy another NAS, it’ll be QNAP or Synology, not DROBO.

Categories: Blog Tags:

Drobo FS: Not so “Plug and Play” as advertised

January 15th, 2011 3 comments

Yesterday I received my brand spanking new Drobo FSPicture of the Drobo FS, exciting stuff. It was delivered in a boring brown cardboard box. Opening the box I’m greeted by another box with the words “Welcome to the world of…” and below that was the Drobo in a nice cloth bag with the title “Drobo” on top.

So after I unpack and plug everything in and install the Drobo Dashboard I sit looking at an annoying Drobo Dashboard that just states something like “No Device Detected”. I check the DHCP leases and find the IP of the Drobo, so that looks OK. Pinging the Drobo also turns out as one would expect, replies all around. Even opening the Public share in Windows Explorer works great. Everything except the administration tool seems to actually work. Checking the Drobo Knowledge Base they point to Firewalls being the main cause of these kind of problems. Well, everything is on a closed of LAN, no Firewalls there. Several restarts of the Drobo later I figure I’ll attempt doing a restart of Windows; lo and behold, that seems to have worked.

So time to play around a bit. Installing a few Drobo Apps and see how that works. Well, it kinda doesn’t, at least not as one would expect from a “Plug and Play” device. Downloaded the App, unzipped and copied the TGZ file to the Dobo Apps folder. Oh yea, and then you have to RESTART the Drobo for it to actually install the App? Why the hell that? The Drobo operating system is based on Linux. Why not just call a small script from the Drobo Dashboard, or even with a Cronjob, that does all that unpacking and installing except first doing it during reboot?

Anyway I install DropBear, a small SSH server and client. I reboot the Drobo to get it installed, then I try to SSH into it. Guess it didn’t work; connection refused. Well, I take a look at the log and it seems that generating the host keys didn’t work. Oh well, another reboot of the Drobo solved that. That was 2 reboots just to install one App? Plain stupid.

So finally, after a couple of hours, I have 2 Western Digital 2TB disks installed and are copying data at a whooping 22-27MB/s over a Gigabit network. Oh well, it’s acceptable speed just for data storage. So after a while I add third 2TB drive, the Drobo starts doing its thing. While the Drobo does its thing I copy some more data to it, or so I thought. Suddenly the Drobo apparently drops all connections and Drobo Dashboard can’t find it. I ping it and it responds just fine *sigh*.

So I turn of the Drobo again, and it apparently takes some time, but rather that than loose the data I already copied there, because the third drive I added was the drive that previously contained the data I already copied. After about 5 minutes I see the Drobo finally is turned off and I start it up again. The drobo starts working on protecting the data telling me not to remove any drives because the data currently isn’t protected, or some such. After another 15-30 minutes I notice that the Drobo is reporting the third drive faulty. Worked fine with no S.M.A.R.T. errors on my Windows 7 computer.

After those initial annoyances I might actually come to like the Drobo, even with the shortcomings it have. The fact that I don’t have to expand and rebuild arrays is nice and the Dashboard is only really needed for first-time setup, or so I think. More updates, maybe, when I have played around with it some more.

iPad som et arbejdsredskab

Hvordan er det så at skrive fra en iPad?
Bestemt bedre end at skrive fra en iPhone, men på ingen måde i nærheden af produktiviteten ved en rigtig computer. Man har ikke 10-finger systemet til rådighed. Man har ikke de vante tastaturgenveje til formattering af tekst.
Denne post skriver jeg på en iPad vha. WordPress App. Det er langsommeligt og jeg skal selv skrive HTML koderne til formattering, hvilket er endnu mere langsommeligt fordi man skal ind under tal, videre under tegn, tilbage til tal, tilbage til bogstaver, så igen unr tal og under tegn for at skrive et enkelt HTMLtag.

Hvordan er den så at læse bøger og magasiner på?
iPad er for tung og uhandig til at være behagelig at læse længere tid på. Også fordi det er en aktiv skærm (oplyst) bliver man hurtigere træt i øjnene ved at læse derpå.
Den ere ret god til at læse magasiner på da de som regel er meget billedtunge, og med pinch-to-zoom gør den det ret godt.

Hvad er fordelen egentlig ved en iPad?
Den er god til lige at læse et eller andet på internettet med, hvis man ikke har en ordentlig computer og browser ved hånden.
Den er god til at spille Cut the Rope og Angry Birds på.
Den er god til at blære sig med, uden egentlig at kunne noget.
Den er ganske glimrende til lige at at fjernstyre hjemmecomputeren via TeamViewer, hvis man ikke lige sidder ved en rigtig computer.
Med Dropbox er den super til lige at få adgang til dokumenterne i skyen.
Den er god som foto album. Jeg kan især godt lide Web Albums App som kan bruge Picasa og Facebook albums.
Den er okay til noter.

Denne ene post tog nok en time at skrive på en iPad. Mistænker dog WordPress App’en for at væ den langsomme del. Dog er iPad’ens ordbog samt måden man navigerer i et dokument også med til at det tager så lang tid.

Categories: Blog, Gadgets Tags: , , , , , ,

Apple irritationer

Nu har jeg efterhånden testet Apple iPhone et par måneder og Apple iPad (iDevices) et par uger, og der er allerede flere grundlæggende ting som irriterer mig grumt.

Det er muligt at mange af irritationerne kan overkommes ved at jailbreak dem, men det er ikke hvad der er tiltænkt fra Apples side, og det er heller ikke noget almindelige brugere skal være nødsaget til at gøre, især ikke når man tænker iDevices der skal bruges i en virksomhed.
Read more…

Unbearable does Drak’Tharon Keep

Another recording, just to play around some more.

Unbearable does Utgarde Pinnacle

Wanted to play around a bit with Xfire Video Recording. It does a pretty good job.

Tech Support Cheat Sheet

This is so true it almost hurts…

Taken from: http://xkcd.com/627/

Categories: Humor, Rants Tags: , , ,

Status Press Widget

December 23rd, 2009 No comments

I’ve been playing around a bit with Status Press Widget by Brian D. Goad.

I found that the data it fetched also showed the nick-/username which I think is kinda redundant so I modified the plugin a bit to let me manage it from the admin interface. While at it I also modified so URL’s are made clickable and cleaned up the code a bit.

Here’s the modified status-press-widget.php file:

<?php
/*
Plugin Name: Status Press Widget
Plugin URI: http://www.briandgoad.com/blog/status-press-widget/
Description: Adds a Widget to display your Facebook/Twitter/Last.FM/Pownce status in your sidebar.
Version: 1.14
Author: Brian D. Goad
Author URI: http://www.briandgoad.com/blog
*/

/*
    Copyright 2008  Brian D. Goad  (email : bdgoad@gmail.com)
            & Adam Walker Cleaveland &  C. Scott Andreas,
            Authors of the original Status Press Plugin

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/

if (!function_exists("htmlspecialchars_decode")) {
    function htmlspecialchars_decode($string,$style=ENT_COMPAT){
        $translation = array_flip(get_html_translation_table(HTML_SPECIALCHARS,$style));
        if ($style === ENT_QUOTES) {
            $translation['&#039;'] = '\'';
        }
        return strtr($string,$translation);
    }
}

class SPWidget {
    //Set Defaults
    var $default_options = array(
        'title' => "",
        'social' => "",
        'url' => "",
        'num' => "1",
        'status_mods' => "",
        'show_time' => 1,
        'time_mods' => ""
    );

    var $o;

    function SPWidget() {}

    //Begin By Checking to See if Widget Can Exist
    function init() {
        if (!function_exists('register_sidebar_widget')) {
            return;
        }
        if (!$options = get_option('widget_status_press')) {
            $options = array();
        }
        $widget_ops = array('classname' => 'widget_status_press', 'description' => 'Add a Social Status to your sidebar');
        $control_ops = array('width' => 200, 'height' => 350, 'id_base' => 'status_press');
        $name = 'Status Press';
        $registered = false;

        //Register Widgets
        foreach (array_keys($options) as $o) {
            if (!isset($options[$o]['title'])) {
                continue;
            }
            $id = "status_press-$o";
            $registered = true;
            wp_register_sidebar_widget($id, $name, array(&$this, 'widget'), $widget_ops, array( 'number' => $o ) );
            wp_register_widget_control($id, $name, array(&$this, 'control'), $control_ops, array( 'number' => $o ) );
        }
        if (!$registered) {
            wp_register_sidebar_widget('status_press-1', $name, array(&$this, 'widget'), $widget_ops, array( 'number' => -1 ) );
            wp_register_widget_control('status_press-1', $name, array(&$this, 'control'), $control_ops, array( 'number' => -1 ) );
        }
    }

    function widget($args, $widget_args = 1) {
        //Retrieve Any Arguments
        extract($args);

        if (is_numeric($widget_args)) {
            $widget_args = array('number' => $widget_args);
        }

        $widget_args = wp_parse_args($widget_args, array( 'number' => -1 ));
        extract($widget_args, EXTR_SKIP);

        //Get Options Saved in Control
        $options_all = get_option('widget_status_press');

        if (!isset($options_all[$number])) {
            return;
        }

        $this->o = $options_all[$number];
        //Set Temp Values (in case they have changed)
        $title = htmlspecialchars($this->o['title'], ENT_QUOTES);
        $url = $this->o['url'];
        $num = htmlspecialchars($this->o['num'], ENT_NOQUOTES);
        $status_mods = htmlspecialchars_decode($this->o['status_mods'], ENT_QUOTES);
        $show_time = $this->o['show_time'];
        $show_nick = $this->o['show_nick'];
        $time_mods = htmlspecialchars_decode($this->o['time_mods'], ENT_QUOTES);
        //Begin Status Press Functions

        require_once (ABSPATH . WPINC . '/rss.php');

        if ($url == '' ) {
            if ($title == '') {
                $title = 'Status Press';
            }
            $disp .= '<p>You Must Supply the URL to your Facebook Status RSS Feed </p>';
        } else {
            //Adjust cache setting
            if ( !defined('MAGPIE_CACHE_AGE') ) {
                define('MAGPIE_CACHE_AGE', 5*60); // five minutes
            }
            $rss = fetch_rss($url);
            if($rss) {
                if ($title == '') {
                    $title = $rss->channel[title];
                }
                if ($num > 0) {
                    $rss->items = array_slice($rss->items, 0, $num);
                }
                foreach($rss->items as $item) {
                    //Get Status Text
                    $status = $item[title];
                    if ($status != '') {
                        // Removes the nick in front of status text and makes any URL's into clickable links.
                        if (!$show_nick) {
                            $status = trim(substr($status, stripos($status, ':')+1));
                        }
                        $status = make_clickable($status);
                        $disp .= "\t<p " . $status_mods . ">" . $status;
                        if ($show_time) {
                            // Get the date + time of the last update from the RSS feed.
                            $pubdate = $item[pubdate];
                            // Convert this string to a time.
                            $pubdate = strtotime($pubdate);
                            // Calculate how long it's been since the status was updated.
                            $today = time();
                            $difference = $today - $pubdate;
                            // Display how long it's been since the last update.
                            $disp .= "</p><p ". $time_mods . ">(Updated ";
                            // Show days if it's been more than a day.
                            if (floor($difference / 86400) > 0) {
                                $disp .= floor($difference / 86400);
                                if (floor($difference / 86400) == 1) {
                                    $disp .= ' day, ';
                                } else {
                                    $disp .= ' days, ';
                                }
                                $difference -= 86400 * floor($difference / 86400);
                            }
                            // Show hours if it's been more than an hour.
                            if (floor($difference / 3600) > 0) {
                                $disp .= floor($difference / 3600);
                                if (floor($difference / 3600) == 1) {
                                    $disp .= ' hour, ';
                                } else {
                                    $disp .= ' hours, ';
                                }
                                $difference -= 3600 * floor($difference / 3600);
                            }
                            // Show minutes if it's been more than a minute.
                            $disp .= floor($difference / 60);
                            $difference -= 60 * floor($difference / 60);
                            if (floor($difference / 60) == 1) {
                                $disp .= ' minute, ';
                            } else {
                                $disp .= ' minutes ago)';
                            }
                        }
                        $disp .= "</p>\n";
                    }
                }
            } else {
                if ($title == '') {
                    $title = "Status Press";
                }
                $disp .= "\t<p>Status Press Error: Something bad happened! <br /> Here are the variables you entered: <ul><li> Title:".$title."</li><li>URL:".$url."</li><li>Number:".$num."</li><li>RSS: ".$rss."\t</li></ul></p>\n";
            }
        }
        //Call Widget
?>
                <?php echo $before_widget; ?>
                <?php echo $before_title . $title . $after_title; ?>

                <div>
                    <?php echo $disp; // Display Widget Content ?>
                </div>

                <?php echo $after_widget; ?>
<?php
    }
    function control($widget_args = 1) {
        global $wp_registered_widgets;
        static $updated = false;
        if (is_numeric($widget_args)) {
            $widget_args = array('number' => $widget_args);
        }
        $widget_args = wp_parse_args($widget_args, array('number' => -1));
        extract($widget_args, EXTR_SKIP);
        $options_all = get_option('widget_status_press');
        if (!is_array($options_all)) {
            $options_all = array();
        }
        if (!$updated && !empty($_POST['sidebar'])) {
            $sidebar = (string)$_POST['sidebar'];
            $sidebars_widgets = wp_get_sidebars_widgets();
            if (isset($sidebars_widgets[$sidebar])) {
                $this_sidebar =& $sidebars_widgets[$sidebar];
            } else {
                $this_sidebar = array();
            }
            foreach ($this_sidebar as $_widget_id) {
                if ('widget_status_press' == $wp_registered_widgets[$_widget_id]['callback'] && isset($wp_registered_widgets[$_widget_id]['params'][0]['number'])) {
                    $widget_number = $wp_registered_widgets[$_widget_id]['params'][0]['number'];
                    if (!in_array("status_press-$widget_number", $_POST['widget-id'])) {
                        unset($options_all[$widget_number]);
                    }
                }
            }
            foreach ((array)$_POST['status_press'] as $widget_number => $posted) {
                if (!isset($posted['title']) && isset($options_all[$widget_number])) {
                    continue;
                }
                $options = array();
                $options['title'] = strip_tags(stripslashes($posted['title']));
                $options['social'] = $posted['social'];
                $options['url'] = sanitize_url(strip_tags($posted['url']));
                $options['show_nick'] = $posted['show_nick'];
                $options['num'] = intval($posted['num']);
                $options['status_mods'] = strip_tags(stripslashes($posted['status_mods']));
                $options['show_time'] = isset($posted['show_time']);
                $options['time_mods'] = strip_tags(stripslashes($posted['time_mods']));
                $options_all[$widget_number] = $options;
            }
            update_option('widget_status_press', $options_all);
            $updated = true;
        }
        if (-1 == $number) {
            $wpnm = '%i%';
            $values = $this->default_options;
        } else {
            update_option('widget_status_press', $options_all);
            $wpnm = $number;
            $values = $options_all[$number];
        }

        //Show Admin Screen
?>
        <p style="text-align:left;">
            <label for="status_press-title"><?php _e('Title (Leave Blank to Pull Title From Feed):', 'status-press-widget'); ?></label><br />
            <input style="width: 200px;" id="status_press-title" name="status_press[<?php echo $wpnm; ?>][title]" type="text" value="<?php echo htmlspecialchars($values['title'], ENT_QUOTES); ?>" />
        </p>
        <script language="javascript">
            function rss(social) {
                actSocial = social.value;
                var txtUrl = document.getElementById("status_press-url[<?php echo $wpnm; ?>]")
                function getUserName(actSocial) {
                    do {
                        var name = prompt("Please input your " + actSocial + " username here:", "");
                    } while (name == "");
                    if (name!=null && name!="") {
                        return name;
                    } else {
                        social.selectedIndex = 0;
                    }
                }
                switch (actSocial) {
                    case "Facebook":
                        okFB = confirm('Please ensure that you are already logged in to Facebook.');
                        if (okFB) {
                            alert('On the following page, please find the My Status RSS feed and copy it into the box below.');
                            window.open("http://www.facebook.com/minifeed.php?filter=11");
                        }
                    break;
                    case "Twitter":
                        name = getUserName(actSocial);
                        if (name != null) {
                            txtUrl.value = "http://twitter.com/statuses/user_timeline/" + name + ".rss";
                        }
                    break;
                    case "Last.FM":
                        name = getUserName(actSocial);
                        if (name != null) {
                            txtUrl.value = "http://ws.audioscrobbler.com/1.0/user/" + name + "/recenttracks.rss";
                        }
                    break;
                }
            }
            function showHide(that, element) {
                e = document.getElementById(element);
                if (that.checked) {
                    e.style.visibility = "visible";
                } else {
                    e.style.visibility = "hidden";
                }
            }
            //showHide(document.getElementById("status_press-show_time[<? echo $wpnm; ?>]"), "status_press-time_mods[<? echo $wpnm; ?>]");
        </script>

        <p style="text-align:left;">
            <span style="vertical-align: bottom;"><?php _e('Social Status Network:  ', 'status-press-widget'); ?></span>
            <select name="status_press[<?php echo $wpnm; ?>][social]" id="status_press-social" onchange="rss(this)">
                <option value=""<?php if($values['social'] == '') echo ' selected="selected"'; ?>></option>
                <option value="Facebook"<?php if($values['social'] == "Facebook") echo ' selected="selected"'; ?>><?php _e('Facebook', 'status-press-widget'); ?></option>
                <option value="Twitter"<?php if($values['social'] == "Twitter") echo ' selected="selected"'; ?>><?php _e('Twitter', 'status-press-widget'); ?></option>
                <option value="Last.FM"<?php if($values['social'] == "Last.FM") echo ' selected="selected"'; ?>><?php _e('Last.FM', 'status-press-widget'); ?></option>
            </select>
        </p>
        <p>
            <label for="status_press-url[<?php echo $wpnm; ?>]"><?php _e('Status URL Feed:', 'status-press-widget'); ?></label><br />
            <input style="width: 230px;" id="status_press-url[<?php echo $wpnm; ?>]" name="status_press[<?php echo $wpnm; ?>][url]" type="text" value="<?php echo $values['url']; ?>" />
        </p>
        <p><?php if($values['show_nick']) $values['show_nick'] = ' checked="checked"';?>
            <label for="status_press-show_nick"><?php _e( 'Show nick-/username: ', 'status-press-widget'); ?></label>
            <input type="checkbox" class="checkbox" id="status_press-show_nick[<?php echo $wpnm; ?>]" name="status_press[<?php echo $wpnm; ?>][show_nick]"<?php echo $values['show_nick']; ?> />
        </p>
        <p style="text-align:left;">
            <label for="status_press-num"><?php _e('Number of Status Feeds to Display <br/>(Use "0" to display All):', 'status-press-widget'); ?></label><br />
            <input style="width: 20px;" id="status_press-num" name="status_press[<?php echo $wpnm; ?>][num]" type="text" value="<?php echo htmlspecialchars($values['num'], ENT_NOQUOTES); ?>" />
        </p>
        <p style="text-align:left;">
            <label for="status_press-status_mods"><?php _e('Stylizing Modifications for Status Tags<br/>(i.e. id="status_press", etc):', 'status-press-widget'); ?></label><br />
            <input style="width: 230px;" id="status_press-status_mods" name="status_press[<?php echo $wpnm; ?>][status_mods]" type="text" value="<?php echo htmlspecialchars($values['status_mods'], ENT_QUOTES); ?>" />
        </p>
        <p><?php if($values['show_time']) $values['show_time'] = ' checked="checked"'; ?>
            <label for="status_press-show_time"><?php _e( 'Show Time Since Status Update: ', 'status-press-widget'); ?></label>
            <input type="checkbox" class="checkbox" id="status_press-show_time[<?php echo $wpnm; ?>]" name="status_press[<?php echo $wpnm; ?>][show_time]" onClick="showHide(this, \'status_press-time_mods[<?php echo $wpnm; ?>]\')"<?php echo $values['show_time']; ?> />
        </p>
        <p style="text-align:left;" id="status_press-time_mods[<?php echo $wpnm; ?>]">
            <label for="status_press-time_mods[<?php echo $wpnm; ?>]"><?php _e('Stylizing Modifications for Time Since Tags <br/>(i.e. id="status-time", etc):', 'status-press-widget'); ?></label><br />
            <input style="width: 230px;" id="status_press-time_mods[<?php echo $wpnm; ?>]" name="status_press[<?php echo $wpnm; ?>][time_mods]" type="text" value="<?php echo htmlspecialchars($values['time_mods'], ENT_QUOTES); ?>" />
        </p>
        <input type="hidden" id="status_press-submit" name="status_press[<?php echo $wpnm; ?>][submit]" value="1" />
<?php
    }
}
$spw = new SPWidget();
//Initialize Widget on Run
add_action('widgets_init', array($spw, 'init'));

?>
Categories: Blog, PHP Tags: , , ,

MySQL connections failures and timeouts, part 2

December 12th, 2009 2 comments

Seems like Surftown got the problems fixed without moving my database to another server.

Categories: Blog Tags: , , ,

MySQL connections failures and timeouts

December 3rd, 2009 No comments

So there seems to be some problems with the MySQL database server at Surftown where my sites are hosted. Surftown have informed me that they will move my database to another server, so there will be some downtime while pointers are updated across the DNS servers, when they have moved it.

Categories: Blog Tags: , , ,