All posts by MattK

About MattK

I like you.

Am I old enough to watch “RAY”?

My partner Sam and I were trying to watch Ray on my ps2 last night, but somehow a parental control was set on it that prevented us from watching the dvd.  Now, it lets you temporarily raise the level by entering a passcode, but I don’t know what the passcode is.

No net access at our place right now, so I called up my man Chris A and he googled the problem for me.  As I suspected, there is a backdoor for forgetful parents and secondhand purchasers.  Hitting select and 7444 lets you delete the passcode.  

Any kid with access to the net can find this.  So you can either keep your kid away from the web, keep your kid away from the web without parental supervision, or keep your kid from the set without parental supervision.  
You can’t rely on technology to do the parenting for you.  This is not going to change.  Any company would be foolish to not build in a backdoor for their customers.  And once it is in there, the word will get out.   It’s the same problem that all digital rights management has:  where do you keep the secret so that the system is usable and valuable?  I cannot emphasize how much you should follow that link.

And what do you do when entities don’t comply with your secret scheme?  Porn dvds don’t trigger the lock because porn publishers have little incentive to trigger parental controls.  They are too small and they are too cheap to invest in enabling parental controls.  It doesn’t make them any money or save them any.  

Nothing substitutes for being involved with your kids.  And nothing substitutes for delivering value to your customers.

Blog from WORD

Looks like Blogger, current host of this humble blog, has released a plugin for Microsoft Word that lets you post and edit straight from the application!  Nice!  No more trying to compose in the tiny blogger text window.  
This is some very nice integration and it’s really the kind of synergy that open api’s allow.  Word is a very nice application for writing in, and why shouldn’t you be using something made for writing?  I like the idea that I might write a post in Word and publish it from there, then post to my blog, someone subscribes from the feed and they may read it in their email client or some feed reader.  All of this with no webbrowser involved.  This is what’s nice about the future today.

Colatown still hot in the future

Interesting – I’m reading Charlie Stross’s awesome novel “Accellerando”. It’s a great read – fast paced, full of amazing ideas and new technology. It is so full of ideas that there is a whole wiki article emerging about it as a study guide. And, even cooler, Charlie saves us a trip to the library by providing the book for free as a download on it’s website. Yup, you can buy it or you can get it for free.

So anyway, I’m reading away when this line jumps out at me:

Rome is hotter than downtown Columbia, South Carolina, over Thanksgiving weekend

– that means Rome is very hot. In the summer, there is nothing between Columbia and hell but a screen door.

New Delicious features

I’m mad for del.icio.us – I keep all of my bookmarks there and use it to discover new cool stuff all the time. It’s how I discovered that little bitty browser in the post below.

Browsing the new blog for the site, I discovered two cool new features.
First, you can now bookmark sites and add a tag for:username. That user will see links for them in their “for” section. This is a great cool way to bookmark stuff for yourself and then make sure that pals get a chance to see it as well. Feel free to bookmark any good stuff for me with the tag “for:snarkhunt” It does raise the issue of spam, as now a spammer could simply script up something that spiders through the site, grabs usernames, then spams with for: tags. Presumably, their could be some sort of whuffie based response. Personally, I like using delicious as a pull based discovery device. I subscribe to where I find the good stuff I like.

The other feature I just noticed is the new posting scheme. This makes it easy for blogs and the like to make it easier for you to bookmark. I just changed my blogger template to put a little post to delicious link on every post in the footer. If you’ve got a delicious account, you should give it a click.

If you don’t have a delicious account you should probably look into it. Delicious is wonderfully useful without an account, but even more useful when you are using it instead of just searching it.

For example, here’s my inbox of links:



Anything tagged with any of those tags on the right that I am interested in shows up right there for me.
Think what subjects you’d be interested in seeing links for…

Bitty Browser

I’m playing around with this bitty browser thing.

Will this thing work? It should be a browse of my delicious links.


Playlist copier

I have a pocket pc that I use to listen to music. I like to change up what i’m listening to while I’m using PocketMusic – which is excellent.
So I wrote a little app to take whatever playlists I’ve created on my computer and copy them over to my sd card for use on the go.
Things that I will do if I figure it out – try to go around having to take sd card out and use usb writer . see if there is someway to just go through active sync.

Since I didn’t see this trivial app out there – I created it.
Here you go.
Gpl License please. If you make something better from this, please let me know and please give it away.
Following is the contents of mainwindow.cs

using System;
using System.ComponentModel;
using System.IO;
using System.Windows.Forms;

namespace PlaylistCopier
{
 /// 
 /// Summary description for playlistcopier
 /// 
 public class MainWindow : Form
 {
  private TextBox txtPlaylistPath;
  private Button btnOpen;
  private GroupBox grpPlaylist;
  private GroupBox grpSaveTo;
  private TextBox txtSavePath;
  private Button btnSavePath;
  private Button btnCopy;
  private StatusBar sb;
  private OpenFileDialog ofd;
  private SaveFileDialog sfd;
  private ProgressBar progressBar;
  /// 
  /// Required designer variable.
  /// 
  private Container components = null;

  public MainWindow()
  {
   //
   // Required for Windows Form Designer support
   //
   InitializeComponent();

   //
   // TODO: Add any constructor code after InitializeComponent call
   //
  }

  /// 
  /// Clean up any resources being used.
  /// 
  protected override void Dispose( bool disposing )
  {
   if( disposing )
   {
    if (components != null) 
    {
     components.Dispose();
    }
   }
   base.Dispose( disposing );
  }

  #region Windows Form Designer generated code
  /// 
  /// Required method for Designer support - do not modify
  /// the contents of this method with the code editor.
  /// 
  private void InitializeComponent()
  {
   this.txtPlaylistPath = new System.Windows.Forms.TextBox();
   this.ofd = new System.Windows.Forms.OpenFileDialog();
   this.sfd = new System.Windows.Forms.SaveFileDialog();
   this.btnOpen = new System.Windows.Forms.Button();
   this.grpPlaylist = new System.Windows.Forms.GroupBox();
   this.grpSaveTo = new System.Windows.Forms.GroupBox();
   this.txtSavePath = new System.Windows.Forms.TextBox();
   this.btnSavePath = new System.Windows.Forms.Button();
   this.btnCopy = new System.Windows.Forms.Button();
   this.sb = new System.Windows.Forms.StatusBar();
   this.progressBar = new System.Windows.Forms.ProgressBar();
   this.grpPlaylist.SuspendLayout();
   this.grpSaveTo.SuspendLayout();
   this.SuspendLayout();
   // 
   // txtPlaylistPath
   // 
   this.txtPlaylistPath.Anchor = 1);
   this.txtPlaylistPath.Location = new System.Drawing.Point(8, 24);
   this.txtPlaylistPath.Name = "txtPlaylistPath";
   this.txtPlaylistPath.Size = new System.Drawing.Size(352, 20);
   this.txtPlaylistPath.TabIndex = 1;
   this.txtPlaylistPath.Text = "";
   // 
   // btnOpen
   // 
   this.btnOpen.Anchor = 2);
   this.btnOpen.Location = new System.Drawing.Point(368, 24);
   this.btnOpen.Name = "btnOpen";
   this.btnOpen.Size = new System.Drawing.Size(24, 24);
   this.btnOpen.TabIndex = 2;
   this.btnOpen.Text = "...";
   this.btnOpen.Click += new System.EventHandler(this.btnOpen_Click);
   // 
   // grpPlaylist
   // 
   this.grpPlaylist.Anchor = 3);
   this.grpPlaylist.Controls.Add(this.txtPlaylistPath);
   this.grpPlaylist.Controls.Add(this.btnOpen);
   this.grpPlaylist.Location = new System.Drawing.Point(16, 24);
   this.grpPlaylist.Name = "grpPlaylist";
   this.grpPlaylist.Size = new System.Drawing.Size(400, 56);
   this.grpPlaylist.TabIndex = 3;
   this.grpPlaylist.TabStop = false;
   this.grpPlaylist.Text = "Find Playlist";
   // 
   // grpSaveTo
   // 
   this.grpSaveTo.Anchor = 4);
   this.grpSaveTo.Controls.Add(this.txtSavePath);
   this.grpSaveTo.Controls.Add(this.btnSavePath);
   this.grpSaveTo.Location = new System.Drawing.Point(16, 88);
   this.grpSaveTo.Name = "grpSaveTo";
   this.grpSaveTo.Size = new System.Drawing.Size(400, 56);
   this.grpSaveTo.TabIndex = 4;
   this.grpSaveTo.TabStop = false;
   this.grpSaveTo.Text = "Copy To";
   // 
   // txtSavePath
   // 
   this.txtSavePath.Anchor = 5);
   this.txtSavePath.Location = new System.Drawing.Point(8, 24);
   this.txtSavePath.Name = "txtSavePath";
   this.txtSavePath.Size = new System.Drawing.Size(352, 20);
   this.txtSavePath.TabIndex = 1;
   this.txtSavePath.Text = "";
   // 
   // btnSavePath
   // 
   this.btnSavePath.Anchor = 6);
   this.btnSavePath.Location = new System.Drawing.Point(368, 24);
   this.btnSavePath.Name = "btnSavePath";
   this.btnSavePath.Size = new System.Drawing.Size(24, 24);
   this.btnSavePath.TabIndex = 2;
   this.btnSavePath.Text = "...";
   this.btnSavePath.Click += new System.EventHandler(this.btnSavePath_Click);
   // 
   // btnCopy
   // 
   this.btnCopy.Location = new System.Drawing.Point(16, 160);
   this.btnCopy.Name = "btnCopy";
   this.btnCopy.Size = new System.Drawing.Size(40, 23);
   this.btnCopy.TabIndex = 5;
   this.btnCopy.Text = "Copy";
   this.btnCopy.Click += new System.EventHandler(this.btnCopy_Click);
   // 
   // sb
   // 
   this.sb.Location = new System.Drawing.Point(0, 199);
   this.sb.Name = "sb";
   this.sb.Size = new System.Drawing.Size(424, 22);
   this.sb.TabIndex = 6;
   this.sb.Text = "Ready";
   // 
   // progressBar
   // 
   this.progressBar.Anchor = 7);
   this.progressBar.Location = new System.Drawing.Point(64, 160);
   this.progressBar.Name = "progressBar";
   this.progressBar.Size = new System.Drawing.Size(352, 23);
   this.progressBar.TabIndex = 7;
   // 
   // MainWindow
   // 
   this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
   this.ClientSize = new System.Drawing.Size(424, 221);
   this.Controls.Add(this.progressBar);
   this.Controls.Add(this.sb);
   this.Controls.Add(this.btnCopy);
   this.Controls.Add(this.grpSaveTo);
   this.Controls.Add(this.grpPlaylist);
   this.MaximumSize = new System.Drawing.Size(960, 264);
   this.MinimumSize = new System.Drawing.Size(168, 248);
   this.Name = "MainWindow";
   this.Text = "Playlist Copier";
   this.grpPlaylist.ResumeLayout(false);
   this.grpSaveTo.ResumeLayout(false);
   this.ResumeLayout(false);

  }
  #endregion

  /// 
  /// The main entry point for the application.
  /// 
  [STAThread]
  static void Main() 
  {
   Application.Run(new MainWindow());
  }

  private void btnOpen_Click(object sender, EventArgs e)
  {
   
   ofd.Multiselect = false;
   ofd.Filter = "M3U Files|*.m3u";
   if(ofd.ShowDialog() == DialogResult.OK)
   {
    this.txtPlaylistPath.Text = ofd.FileName;
   }
  }

  private void btnSavePath_Click(object sender, EventArgs e)
  {
  
   
   //sfd.Multiselect = false;
   //sfd.Filter = "*.m3u";
   sfd.DefaultExt = ".m3u";
   
   
   if(sfd.ShowDialog() == DialogResult.OK)
   {
    this.txtSavePath.Text = sfd.FileName;
   }
  }

  private void btnCopy_Click(object sender, EventArgs e)
  {
   
   FileInfo fi = new FileInfo(txtPlaylistPath.Text.Trim());
   FileInfo fo = new FileInfo(txtSavePath.Text);
   DirectoryInfo dirOut = fo.Directory;
   FileInfo fcur;
   TextReader tr;
   if8) == null)
   {
    MessageBox.Show("Problem Opening " + fi.Name + "for reading.");
    return;
   }
   //get linecount of the playlist
   int i = 0;
   while(tr.ReadLine() != null)
   {
    i++;
   }
   tr.Close();
   progressBar.Step = 1;
   progressBar.Maximum = i;
   progressBar.Minimum = 0;

   tr = new StreamReader(fi.OpenRead());

   
   TextWriter tw;
   if9) == null)
   {
    MessageBox.Show("Problem Opening " + fo.Name + "for writing.");
    return;
   }
  
   

   try
   {
    sb.Text = "Copying";
    string line;
    while( (line = tr.ReadLine()) != null)
    {
     //is this a comment line?
     if (line.StartsWith("#"))
     {
      //It's a comment line.
      
      //progressBar.
      //write it to the new file and then keep going
      tw.WriteLine(line);

      //increment progress
      progressBar.PerformStep();
     
     }
     else
     {
      //it's a file path
      //find the file
      fcur = new FileInfo(fi.Directory.FullName + @"\" + line);
      
      if(fcur.Exists) //only move good files
      {
       //only move files that don't already exist
       FileInfo ftest = new FileInfo(dirOut.FullName +  @"\" + line);
       if(!ftest.Exists)
       {
        //copy it to the new file directory 
        DirectoryInfo dirnew = new DirectoryInfo(dirOut.FullName + @"\" + Path.GetDirectoryName(line));
        if(!dirnew.Exists)
        {
         //Parent directory of new file doesn't exist yet

         
         // need to create the parent dir for the file.
         dirnew = dirOut.CreateSubdirectory(Path.GetDirectoryName(line));
         if(! dirnew.Exists)
         {
          MessageBox.Show(@"Can't create "+ dirnew.FullName);
          return;
         }
         
        
         fcur.CopyTo(dirOut.FullName +  @"\"+ line);
        }
       }
       //write the entry to the new playlist
       tw.WriteLine(line);
       //increment progress
       progressBar.PerformStep();
      }

     }
    }
   }
   catch(Exception ex)
   {
    MessageBox.Show(ex.Message + ex.StackTrace);
   }
   finally
   {
    
    tr.Close();
    tw.Close(); 
    progressBar.Value = 0;
    sb.Text = "Ready";
   }

   
   
  }


 }

 //TODO: separate out the concept of a playlist into an interface


}
  1. System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right  (back)
  2. System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right  (back)
  3. System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right  (back)
  4. System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right  (back)
  5. System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right  (back)
  6. System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right  (back)
  7. System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right  (back)
  8. tr = new StreamReader(fi.OpenRead(  (back)
  9. tw= new StreamWriter( fo.OpenWrite(  (back)

Responses to This Mobile Life greasemonkey script

I’m reading the comments and am trying to respond to them in an organized way.

* You are a jerk for revealing the cool secret I discovered! Now they will ruin it for EVERYBODY!
** Sorry. I think they give this stuff away. It’s their servers. If they want to, they have that right. Let’s give them a chance to be awesome instead of expecting them to be jerks. Take some comfort in the fact that if the links get obfuscated it will affect me (sob), just as it will when someone else beats the obfuscation (yay).
** Tell all your friends you were doing it way back when. Show them file creation dates to prove it. They’ll be totally wowed. Don’t mention how you didn’t share the idea with your community.

* You are a jerk for stealing from public radio.
** It’s public radio. They give this away over the airwaves. They give it away over the internet. They want you to listen to it. Feel free to donate directly to the station or to NPR in general. I hope more people listen to this stuff and give them money, but not so much that they can retire in luxury from their job of making cool stuff for me to listen to.

* You are a jerk for using up all the bandwidth of WBEZ.org
** Actually, I only created this script after reading Mark‘s review of the RadioShark in the last issue of Make. I told him about the trick and told him I’d try to whip up a greasemonkey for it. I then gave him a link to the script and he blogged it on boingboing. So he’s a awful nasty man for telling all of you about it. Pledge that you’ll never read his awful nasty blog again for what they did to wbez’s servers.
** I have also taken a suggestion from the comments and put in the coral cache address. That’s so hot, I love it. Wish I’d thought of it in the beginning.
** Turn: I’m saving them bandwidth. If you listen to the same stream twice you download it twice. If you download it once each subsequent listen is FREE to wbez.

* You are a jerk for your crappy blog design.
** I apologize. It’s definitely not ready for prime time – but I think it is just the pre tag blogger put in when I pasted the greasemonkey script in. In my defence I think any long line in this particular template with that tag will overlap the sidepanel. Can’t be helped unless I take down my flickr panel. That ain’t happening.

* Thanks!
** You’re welcome! It feels good to be able to give even something tiny back to the internerds who’ve given me tons of cool stuff. Gift economies rock. Now go do wonderful things.

BTW – this website is no longer active, so you can take the domain name!