Recursively download website files using WGET

Posted by & filed under Linux, OS X.

I use the following command to recursively download a bunch of files from a website to my local machine. It is great for working with open directories of files, e.g. those made available from the Apache web server. The following can be added to your .bash_profile or .bashrc script, depending on which your OS/distro recommends:… Read more »

A Better Debian SSH Login Message

Posted by & filed under Linux.

I’m a big fan of running Debian Linux on the server. To do a lot of administration it requires one to SSH into the machine. The default message displayed to the user contains a bunch of copyright information, which isn’t all that useful. Here’s an example of the default SSH MOTD on my server: $… Read more »

Install Node.js on Debian 6

Posted by & filed under Node.js.

If you’re like me, you prefer to install Linux packages via the systems package manager. By doing so, whenever you run your update command, you’re going to get the most current copy of everything. Unfortunately, Debian doesn’t seem to have Node.js in their package repo by default: $ sudo apt-get install nodejs Reading package lists…… Read more »

Linux CLI apps should have a –json flag

Posted by & filed under Linux.

We all know the humble ping command. Check out its nice, human-readable output: $ ping -c 4 google.com PING google.com (74.125.225.131) 56(84) bytes of data. 64 bytes from ord08s09-in-f3.1e100.net (74.125.225.131): icmp_req=1 ttl=63 time=26.6 ms 64 bytes from ord08s09-in-f3.1e100.net (74.125.225.131): icmp_req=2 ttl=63 time=27.4 ms 64 bytes from ord08s09-in-f3.1e100.net (74.125.225.131): icmp_req=3 ttl=63 time=25.7 ms 64 bytes from… Read more »

Gracefully Kill Node.js App from Ctrl+C

Posted by & filed under Node.js.

Often times, we run a Node.js app directly from the command line while prototyping. To kill such a process from the command line, pressing Ctrl+C does the trick. Unfortunately, this causes the app to halt what it is doing and come to a halt, often throwing a few errors depending on the type of work… Read more »

Creating Self Executable PHP Scripts

Posted by & filed under PHP.

Normally, to run a PHP script, you type php ./script-name.php, or more conveniently, php script-name.php. If you want to make a php script executable, e.g. by typing ./script-name.php, you’ll want to add the following line to the top of the document: #!/usr/bin/env php Yes, that goes before the <?php statement. You’ll also want to let… Read more »

Guide to installing ClipShare 4.1 on a Linux VPS

Posted by & filed under Linux, Web Server.

This guide is currently incomplete, and will likely stay incomplete since we didn’t keep notes and don’t plan on ever installing the application again. Hopefully these introductory steps will help. This is a technical guide detailing the steps a person has to go through to install ClipShare 4.1 on their web-server. Firstly, you’ll need a… Read more »