Archive for the ‘ Technology ’ Category

Combine multiple p2p blocklists into a nice single URL

…by using Block Combinator at http://ip2k.com/bl. Just follow the instructions there and put the resulting URL into the “Enable blocklist” line in Transmission, enable automatic updates, and sleep safer knowing that you’re using all the blocklists you want in Transmission or any other blocklist software that supports P2P format blocklists. Block Combinator can grab remote blocklists in P2P format, either gzipped or not. It outputs a single gzipped file that is a combination of all your specified blocklists.

Clicky kitty:

Windows XP / Vista / 7 Control Panel Shortcuts

One pain point that I’ve heard a lot with Vista and 7 is regarding the “condensed” control panel. Ever since XP, I’ve been using a quick tip that will really speed up your control panel access. Basically, you’re just launching the control panel applet directly, but it’s much faster than trying to hunt down the elusive (and probably most often used) control panel applet: Network Connections.

If you don’t already know the “Windows Key” + r shortcut to open Start -> Run, well…you’re welcome. Type in ‘ncpa.cpl’, hit enter, and marvel at how much time you just saved. There are many more:

File namePurpose
Access.cplAccessibility properties
Appwiz.cplAdd/Remove Programs properties
Desk.cplDisplay properties
Hdwwiz.cplAdd Hardware properties
Inetcpl.cplInternet properties
Intl.cplRegional Settings properties
Irprops.cplInfrared Port properties
Joy.cplJoystick properties
Main.cplMouse properties
Mmsys.cplMultimedia properties
Ncpa.cplNetwork Connections properties
Nusrmgr.
cplUser Accounts properties
Nwc.cplGateway Services for NetWare properties
Odbccp32.cplOpen Database Connectivity (ODBC) Data Source Administrator properties
Powercfg.cplPower Options properties
Sapi.cplSpeech Properties
Sysdm.cplSystem properties
Telephon.cplPhone and Modem Options properties
Timedate.cplTime and Date properties

Today, I Learned…

‘TIL’ is commonly used on the internet as shorthand for ‘Today, I Learned’, and it inspired me to make a little tool to keep track of things that I’ve learned. I can’t recall a day in recent memory where I didn’t learn something, no matter how seemingly insignificant. I think it would be interesting to keep track of these things over the course of a year or so, then go back and look through all the little bits of information that have been picked up along the way.

This is really a simple little CLI app, but it faithfully records whatever you have to say, across multiple lines and with (hopefully) whatever funky symbols you choose. It’ll also pick 3 of your old random entries and show them to you, to remind you of things you found interesting enough to write about in the past. Hopefully, it’ll surprise you some day and bring back some great memories. If nothing else, it’s a good way to prove to yourself that you do learn something every day.

Installation:
NOTE: Rubygems is broken right now so it’s not available as a Rubygem just yet…hang tight!

$> gem install clispell

Usage:

$> til
What did you learn today?  Press ^d (ctrl+d) when done.
You can pass fsck '-O -' to show a progress bar while it's running
=> Saved!
On 2011-09-06 23:18:53 -0400 you learned how to use Jeweler to release stuff again

On 2011-09-06 23:36:29 -0400 you learned You can pass fsck '-O -' to show a progress bar while it's running

On 2011-09-06 23:18:23 -0400 you learned eggs.

Clicky kitty:

Cisco Website Login Guest Account

Since Cisco has the worst compulsory registration I have ever seen, I’m posting an account you can use after the break. Warning: Username and password contain potentially offensive text.
Read more

Node.js Fetch URL and display page body

Whoa, it’s been a long time since I’ve posted here. I’ve been working on a lot of fun stuff lately; SomaSeek.com is running an updated version using PHP-PDO and much-improved javascript. I’m also working on integrating Sphinx or Solr search (Sphinx is a bit more appealing to me but seems like it should have a generator that would analyse your DB schema and rough out a configuration for itself), and working on a JSON / SOAP / XML-RPC API for it (which I *might* just end up doing in Node.js for funsies).

Anyway, here is a quick diddy in Node.js that should help you get started a bit more than the super simple examples they usually provide. Pay close attention to the scope of everything and how the callbacks are working..it’s a bit to wrap your head around at first.

KNOWN LIMITATIONS (Want to fix it? Get on bitbucket and submit your patch!!! https://bitbucket.org/ip2k/simple-nodejs-fetch-and-display-page-body )

  • It will fail / barf if you request a page that redirects (like http://msn.com).  This is because msn.com redirects to www.msn.com and the HTTP status code is either 301 or 302.  Still working on better error trapping for that!
  • It won’t get secondary page resources.  Not sure how to solve that without involving sessions and/or forking, which is kind of beyond the scope of this right now.  I’m not going to implement this unless there is serious interest in this…not sure why there would be; you’d be better off using a proxy.
var request = require('request'),
  url = require('url'),
  http = require('http');

function getPage (someUri, callback) {
  request({uri: someUri}, function (error, response, body) {
      console.log("Fetched " +someUri+ " OK!");
      callback(body);
    });
}

var server = http.createServer(function (request, response) {
  requestedUri = url.parse(request.url).pathname;
  requestedUri = requestedUri.substring(1);
  console.log("Got request for " +requestedUri);
  if (!requestedUri.match('^http')) {
    console.log("requested URI is not a valid URL!  Dropping request...");
    response.writeHead(400, {"Content-Type": "text/html"})
    response.end("Invalid url");
  } else {
    getPage(requestedUri, function(body) {
      response.writeHead(200, {"Content-Type": "text/html"}),
      response.write(body),
      response.end("ip2k.com NodeJS simple server demo")
    })
  }
});

server.listen(8000);

console.log("Server running at http://127.0.0.1:8000/http://example.com");
console.log("To use, just append some URL as a request, like this: http://127.0.0.1:8000/http://example.com");

SomaSeek

somaseek.com is a new search engine for the history of all the great internet radio stations at http://somafm.com . It has near real-time history (updated every 5 minutes) and browsable history for each station. I’m working on getting pagination going for history, as well as a datepicker for browsing and Sphinx-powered search instead of the current MySQL fulltext search. I’m trying to keep it simple and not clutter it up with junk. I do plan on moving away from the very plain look of the site, but for now it’s usable and I’ve been tracking all of SomaFM’s stations since late February 2010, so there is already quite a bit of history that you can look through.

This project was born out of a few needs: I needed to get better at actual PHP / MySQL coding, I was annoyed with the twitter history of SomaFM (As of about a month ago, song history isn’t even listed on Twitter for the soma stations), and I always found good music through SomaFM but wanted to quickly learn more about the artist / song.

SomaFM has these key features to solve the above problems:
- Written in simple and extensible PHP / MySQL / JavaScript / CSS / HTML. Sphinx search coming soon.
- Tracks all of the stations, all of the time, so you can always search for what you were listening to.
- Provides links to LastFM, iLike, and Amazon Music (via SomaFM’s reseller link, so they get a portion of your purchase if you click through and buy via somaseek.com or somafm.com) to quickly find out more about songs / artists and give back to the community.
- Open source in actual implementation, just like Reddit. Other sites are starting to “see the light” and do this too. Hosted on Google Code is all the actual source code to the website, minus the database passwords, of course!
http://code.google.com/p/somaseek/

Please use and enjoy SomaSeek, and leave comments on this post if you have any ideas on how to improve it that weren’t listed above. I played with the idea of Facebook / Twitter “share” integration as well as trying to link to the groups on Facebook.

Page 1 of 3123