splitbrain.org

electronic brain surgery since 2001

Writing /var/www/html/data/log/deprecated/2024-11-07.log failed

Your Questions Answered #5

What does the # command in Twitter do?

This is called a hashtag. The hash is used to markup a word as tag. This was first invented (or popularized) by the hashtags.org website. The idea is to be able to quickly see all tweets about a certain topic. The free and open source identi.ca microblogging service has hashtags built right into the software.

Additional info can be found in the Twitter Fan Wiki

What does the glowing blue strip on the Wii mean?

The Wii disc slot will glow blue when you have new messages. Eg. when an update becomes available. This only works with a network connection and the “Wii Connect 24 Option” enabled.

To save energy I recommend disabling this feature.

How do I view Pocket Queries?

Pocket Queries are files generated by the geocaching.com website (available to premium members only). They are standard GPX files containing a number of geocache waypoints. You can load these files in any tool that understands the GPC format. Have a look at these lists for a start:

Who invented the LightBox JavaScript?

As far as I know, the very first implementation was made by Lokesh Dhakar and was released in 2005. You can still find it at the original website.

How to read the Browser History?

I assume this question is how to access the history data programmatically. If you're using Firefox, it is real easy because it is all stored in a SQLite database named places.sqlite in your profile folder.

Here's an example to get the top 10 most visited pages:

$> sqlite3 ~/.mozilla/firefox/*.default/places.sqlite \\
   'SELECT url, visit_count FROM moz_places ORDER BY visit_count DESC LIMIT 10;'

How to quickly tell who isn't following you back on Twitter?

An interesting question which needs quite some manual work when using the Twitter interface, but can easily be solved through Twitter's API. Basically you just pull lists of your friends and followers and compare them. Here's the code for doing that in PHP:

<html>
<head>
    <title>Non-Mutual Twitter friends</title>
</head>
<body>
 
<?php
$user = preg_replace('/[^\w]+/','',$_GET['user']);
 
if(!$user){
    echo '<form action="">Username: <input type="text" name="user" />
          <input type="submit" value="go" /></form>';
}else{
    $api['twitter']  = array('http://twitter.com/','http://twitter.com/');
    $use = 'twitter';
 
    $followers = array();
    $xml = @simplexml_load_file($api[$use][0].'followers/ids/'.$user.'.xml');
    if(!$xml) die('failed to query API, probably hit the limit. Try again later');
    foreach($xml->id as $idnode) $followers[] = (int) $idnode;
    $friends = array();
    $xml = @simplexml_load_file($api[$use][0].'friends/ids/'.$user.'.xml');
    if(!$xml) die('failed to query API, probably hit the limit. Try again later');
    foreach($xml->id as $idnode) $friends[] = (int) $idnode;
    $miss = array_diff($friends,$followers);
 
    echo '<ul>';
    foreach($miss as $id){
        set_time_limit(30);
        $xml = @simplexml_load_file($api[$use][0].'users/show.xml?user_id='.$id);
        if(!$xml) die('failed to query API, probably hit the limit. Try again later');
 
        echo '<li style="clear:left">';
        echo '<img src="'.$xml->profile_image_url.'" align="left" /> ';
        echo '<a href="'.$api[$use][1].htmlspecialchars($xml->screen_name).'">';
        echo htmlspecialchars($xml->name).'<br />('.htmlspecialchars($xml->screen_name).')';
        echo '</a>';
        echo '</li>';
 
        flush();
        ob_flush();
        sleep(2);
 
    }
    echo '</ul>';
}
?>
 
</body>
</html>

You can try the script here: Non-mutual Twitter Friends.

Unfortunately, Twitter puts some heavy limits on the number of queries you can make to the API so you need to be really lucky ;-). You're probably better off running it on your own server.

BTW. I wanted to make it usable for identi.ca as well, but it seems like the needed API calls require a login there. But modifying the source accordingly shouldn't be too hard.

Tags:
faq, twitter, wii, lightbox, firefox, geocaching
Similar posts: