Archive for the ‘Quick Tips’ Category

18 Feb
2012

Configuring BOPM for TorDNSEL

Background

If you have a working BOPM installation, you are trying to prevent abuses of your IRC network effected through anonymity services such as proxies. BOPM has built-in support for scanning for open proxies. It also has support for looking up clients in DNSBLs, which are used to publish lists of misbehaving or malign hosts. One such DNSBL, called TorDNSEL, provides a way to check users connecting through the Tor anonymity service.

(more…)

14 Jan
2011

Downloading wget Without wget: Use bash

There are many ways to download and install wget without having wget itself installed. For example, one can use curl, a sort of competitor to wget, or a package manager with libfetch or some other library-level downloader integrated (such as pacman). One may be able to use SSH’s scp or sftp utility or even use netcat to transfer a wget tarball over a network. But these methods of obtaining wget are not always feasible or even possible whereas a bash shell and a few core utilities are often readily available.

(more…)

21 Nov
2010

Converting .MTS video files into .mp4 files

I have a Canon HF200 video camera and it outputs HD video, but it’s in .MTS file format. This is a pain because there are no good free video converters or editors for .MTS files. But using Avidemux, an open-source video converter, I was able to edit and convert my video to .mp4 while keeping my sanity and my money.

(more…)

26 Jul
2010

JavaScript “Current Filename” Function

I found the need to get the current filename, without the file extension, of a webpage using javascript. I thought there would be an easy way with jQuery, but I found a good way to do it in plain javascript. I made a quick function to take care of this task that might save you some time, the compressed version is shown below. I’ll add a more human-readable version in the near future.This code is very unreadable! Please don’t use it blindly, as it may not work in all cases.

function getCurrentFile() {
  var filename = document.location.href;
  var tail = (filename.indexOf(".", (filename.indexOf(".org")+1)) == -1) ? filename.length : filename.lastIndexOf(".");
  return (filename.lastIndexOf("/") >= (filename.length - 1)) ? (filename.substring( filename.substring(0, filename.length - 2).lastIndexOf("/")+1, filename.lastIndexOf("/"))).toLowerCase() : (filename.substring(filename.lastIndexOf("/")+1, tail)).toLowerCase();
}

This function returns the current filename (minus the file extension) in all lower-case. Feel free to modify it to suit your needs. It also works properly even when a URL does not have a file extension (such as with some asp-based sites), or when there is no filename present (returns the folder name). This function is great for highlighting menu items based on which page the user is currently browsing. If you don’t understand some of the syntax, note that I’m using javascript’s conditional syntax as shorthand for if/else statements.

13 Dec
2009

Insurgency: Access your linux box from anywhere

Routers :: Credit: flicr user stars6

The problem: you have a computer sitting behind a firewall. You want to access it from a different location, but you don’t have the ability to forward any ports to it. The answer: SSH tunneling.
(more…)

20 Aug
2009

Quick Tip: Quit Messages in IRC

Ever exited out of IRC without telling people why? Don’t know how to tell people why you’re leaving? Then you need to use quit messages. Really. It’s just annoying to see people randomly leave with no reasoning.

(more…)

19 Aug
2009

Quick Tip: Quieting computer fans

Does your computer sound like a supersonic jet somehow hovering directly over your workspace? Does your computer make odd scraping noises, often accompanied by random crashes? Check out this [protofusion] quick tip.

(more…)

Gaggia Classic Disassembly and Cleaning

Gaggia Classic Disassembly and Cleaning

I recently purchased a used Gaggia Classic machine on Amazon. After realizing that it was not as “lightly used” as

Arduino Leonardo - Interrupts

Arduino Leonardo – Interrupts

As of Arduino 1.0, interrupts are not supported on the Arduino Leonardo. I’m working on a project using the atmega32u4