CoVim

From fredkschott.com

Today we’re announcing CoVim, a plugin that adds multi-user, real-time collaboration to your favorite (or least favorite) text editor. CoVim allows you to remotely code, write, edit, and collaborate, all within your custom Vim configuration. Originally started as a senior capstone project for Tufts University, we’re now open-sourcing it to give the world one of Vim’s most requested features. Think Google Docs for Vim.

Work on CoVim started almost a year ago. I wanted to explore this concept of a shared classroom note-taking platform (someone should still do that, by the way) while my project partner Sam Haney wanted to explore something a bit more well-known and dependable. We decided to meet each other halfway, and CoVim was born.

Continue reading “CoVim”

Resetting the WordPress Password

Sometimes a customer will forget their WordPress password. You can easily change any WordPress password with just a few simple steps. This can be done easily through PHPMyAdmin or if PHPMyAdmin is not available, via the command line.

With PHPMyAdmin:

Find the database that the wordpress install is using. This will be listed in the wp-config.php file:

define('DB_NAME', 'theuser_wordpressdb');

In PHPMyAdmin, click on the database name. This will open up a list of tables. Click the wp_users table. This contains all of the WordPress user data, including login names and passwords. The passwords are usually encrypted using a modified md5 format.

Find the user you want and click the small edit icon on that row. It is on the left of the row and looks like a pencil. This will load a screen with a box for each value in the row.

Copy down the current md5 password somewhere safe. This can be used to restore the password back to how it was when you found it.

You don’t have to use an extra tool to MD5 the password. Just type or paste your chosen password into the password field, change the function in PHPMyAdmin (to the left of your text field) to MD5, and hit GO.
This will md5 the password you entered, and save your changes.

Next, test your new login credentials.

If you want, you can change the password back without ever knowing what it was by repeating this process using the original md5 hash you copied down!

Simple cPanel Migration

Hi,

Just a quick tutorial on migrating a cpanel account from one server to another.

Summary:

ssh into the remote server and run
/scripts/pkgacct username
and then logout.

Login to your local server and run
scp -r root@remoteIP:/home/cpmove-username.tar.gz /home
that will bring the file over to your local /home directory.

Now login to WHM and go to Home »Backup »Restore a Full Backup/cpmove File

Then select cpmove file / usernameacct to restore

Click restore

Measure response time through curl

Here is a little script which show you how you can pull the response time of a website. This idea was pulled from an IBM articles and a script was written to do this. Here is the script:

touch curlcheck
vim curlcheck

and insert the following:

#!/bin/bash
CURL="/usr/bin/curl"
GAWK="/usr/bin/gawk"
echo -n "Please pass the url you want to measure: "
read url
URL="$url"
result=`$CURL -o /dev/null -s -w %{time_connect}:%{time_starttransfer}:%{time_total} $URL`
echo " Time_Connect Time_startTransfer Time_total "
echo $result | $GAWK -F: '{ print $1" "$2" "$3}'

to save the file
:wq
then
chmod +x curlcheck
run the script

root@server:~#:sudo ./curlcheck
Please pass the url you want to measure: http://domain.com
Time_Connect Time_startTransfer Time_total
1.122 3.455 9.205

voila!

explainshell.com

http://explainshell.com/ is a nifty little website created by Idan Kamara that takes difficult Linux command line man pages and one liners and makes them much easier to understand by breaking down a command into it’s respective parts.

This site contains 29761 parsed manpages from sections 1 and 8 found in Ubuntu’s manpage repository. A lot of heuristics were used to extract the arguments of each program, and there are errors here and there, especially in manpages that have a non-standard layout.

Check it out!