I recently ran into an issue where the MySQL database service would not start on my server. After searching around a bit (and being led astray a few times), I found the culprit: not enough RAM. It turns out that my set up (Ubuntu 12.04 with 256 MB RAM) did not have a enough memory […]
You can use rbash to limit a user to their own home directory (they cannot cd to other directories, or write to them). To do this, you will want to edit /etc/passwd and change the user’s shell: test:x:1001:1001:,,,:/home/test:/bin/bash should change to test:x:1001:1001:,,,:/home/test:/bin/rbash I did this on Ubuntu 12.04, so if your system varies from that […]
There are two good ways to make your computer execute a command at a specific time of the day: cron and the “at” command. We’re going to take a look at the quick way to do this via the terminal with “at”. This example will execute the ls command at 3:09pm according to your system’s […]
Here is how you create an encrypted zip from the terminal: The above command will create an encrypted zip archive of a folder named nameOfYourFolderToZip and save it to archive.zip.
Some of the popular desktop environments make it really easy to use two monitors. Some even automatically detect and arrange them for you. However, Openbox doesn’t do this (it’s a window manager, anyway, not a DE) out of the box. And I don’t like to install heavy apps to arrange my displays when I can […]
One of the most powerful things about Vim is the ability to assign arbitrary key shortcuts or mappings. This allows you to make your most frequent activities into very fast mappings of just a few keystrokes. For example, I have the movement from the current tab to the previous one assigned to “gr” in normal […]
Do you follow too many subjects across the Interwebs? How about subscribe to a firehose like Hacker News (the RSS feed spouts 83.3 items per day)? If you answered yes to either of those questions, then you probably have an extensive collection of things you want to “read later”. If you take a look at […]
To make a query to a MySQL database using PHP, you will first create the PHP script. I’m assuming that you have created your database and have the connection information. Then you can take this script and create a webpage where the title to each entry will be outputted in HTML.
It’s pretty common to issue commands in a Linux terminal that take a little while to complete. Instead of sitting and waiting for the program or process to complete, you can issue the alert command so you know when it completes. For example, if you issue the command sleep 5; alert, your terminal will run […]
I tend to suspend my Ubuntu machine quite a bit. A three second wakeup is a lot faster than a 30 second boot and I can keep my windows open while the machine is asleep without using much more power than a fully shut down computer. Instead of having to reach for a power button […]