Using an .htaccess file to password protect an Apache folder in Ubuntu 12.04

Coming soon.

Batch re-encode MP3s and fix ID3 tags using ‘lame’ and ‘id3cp’ in Ubuntu 12 script.

Coming soon.

Give root privileges to a new user & safely disable the root account on Ubuntu 12.04

Log into your server as root.

Create a new user account for yourself.

You’ll be prompted to choose a password and enter user information:

Now let’s give the new user “james” root/sudo permissions. Type ‘visudo’ to edit the /etc/sudoers file:

Find the lines that look like this:

And add your new user underneath, following the same pattern as root:

Save the file:

Press Control-X
Press the letter Y
Hit enter.

Now log out as root, and log in with your new account.

Finally, disable the root account using the ‘sudo’ command:

Output:
Now any time you need to run something using root permissions, just prefix those commands with “sudo” using your new user/account:

For example:

You’ll be prompted to enter your password if you haven’t used sudo for a few minutes prior, after which the command will run:

Enjoy!

How to create a child theme in WordPress

Why do I need a child theme?

If you’ve modified any of your theme’s files directly, you’ll lose any changes you’ve made when your theme is updated. By using a child theme, you can override your theme’s settings without running the risk of losing your work.

[Read more…]

Using Pods Framework for custom post types & taxonomies in WordPress

The Pods Framework is an open-source, GPLv2+ licensed PHP project. The goal was to create an interface and PHP codebase to easily create, extend, and manage content types within WordPress. While the normal WordPress content architecture is limited to the built-in tables, a primary feature of Pods allows you to base content types off of their own custom tables designed around each content types’ needs.

The Pods Framework allows an ordinary user or developer to easily create and extend custom post types, content types, taxonomies, users, media, or comments — helping you keep your content organized and speed up the development of your project.

Pods starts as a blank slate, as most frameworks do. The control is put into the hands of the developer to mould it into what is needed, without the fluff. Much of Pods’ functionality is coupled with a UI for easy administration, however, there are large portions of the codebase that can be optionally used for advanced implementations or specific project needs. You control everything while Pods Framework does the behind-the-scenes heavy lifting.

 

Pods Framework Official Site

How to check running tasks, CPU & RAM usage in Ubuntu 12.04

Check CPU Usage

Type “top” to see a multitude of information, constantly updated:

Output:

Hit the “1” key to see CPU usage by core:

And “q” to exit out:

To see a static list of the top 20 CPU-hogging tasks running on your system:

Output:

Or to list all tasks with both CPU & RAM usage:

For information about your CPU:

Output:

 

Check Memory (RAM) Usage

Type the following into your into your shell:

The output will look as follows:

In my case, I’ve got a total of 4GB of RAM and an 8GB swap file.

How to list users, add users, edit users and more in Ubuntu 12.04

To list all users you can use:

[Read more…]

Find files containing a text string in subfolders using ‘grep’ in Ubuntu 12.04

Go to the folder you want to search in using cd:

For a simple list of files containing the example string “tags”:

[Read more…]

How to install Icecast streaming radio/audio server on Ubuntu 12.04

Coming soon.