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.
Archive for the ‘Quick Tips’ Category
2011
Downloading wget Without wget: Use bash
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.
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.
2009
Insurgency: Access your linux box from anywhere

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…)
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.
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.


