How To's
'SSH into Webfaction server account'
You can connect to any of your domain names or (Username).webfactional.com using your control panel username and SSH password. If you've forgotten your SSH password it can be reset at "Account -> Change SSH Password" in the control panel.
SSH command:
ssh yourusername@yourusername.webfactional.com
where 'SSH p/w' is clue long p/w
'How to add a new domain and website to Webfaction account?'
The first thing that you need to do is point your domain name at our name servers using your domain name regisitrar's control panel. Our name servers are:
ns1.webfaction.com
ns2.webfaction.com
ns3.webfaction.com
ns4.webfaction.com
Notes:
Once that's done all that you have to do is add the domain name to your account at "Domains/Websites -> Domains" in the control panel.
Next, if you are going to be creating a website on the new domain, you need to create an Application. Go to "Domains/websites -> Applications" and create a new app which will be placed on your new domain. If you don't know which type of app, just pick "Static/CGI/PHP". After you have your Application prepared, go to "Domains/Websites -> Websites" in the control panel and add a new website record or add your domain to an existing website record. When creating the new website record, select the new domain, add one app line, select the new Application, and type "/" in the mount point.
If you want to configure e-mail addresses for this domain you need to go to "E-mails -> E-mail addresses" and create e-mail addresses for this domain.
Note: It is also possible to use your own external DNS servers if you want. See "Can I use my own DNS servers" for more information.
How to password protect parts of a website
The following links provide details on how to use .htaccess and .htpasswd to facilitate authentication to web pages held within sub-folders of your main site
Let's say you wanted to password-protect the contect of your $HOME/webapps/<appname>/private/ directory. All you have to do is put a .htaccess and a .htpasswd file in that directory. The .htaccess file should contain:
AuthUserFile <home>/webapps/< name>/private/.htpasswd AuthName EnterPassword AuthType Basic require valid-user # Hide files starting with a dot #(.htaccess and .htpasswd in particular) <Files .*> order allow,deny deny from all </Files>
The .htpasswd can be created using the "htpasswd" command-line tool. If you're not familiar with is just run "man htpasswd" for more details. Here is how you use it to create a .htpasswd file:
$ htpasswd -c .htpasswd user1 New password: Re-type new password: Adding password for user user1
How to insert data from your WordPress™ Blog into your webpage :
You must have WP blog available on your server..the:
require('../wp/wp-blog-header.php')
below shows example of relative path to wp-blog
<?php
// turn off WordPress themes and include the WordPress core:
define('WP_USE_THEMES', false);
require('../wp/wp-blog-header.php');`
?>
<?php
$postslist = get_posts('numberposts=7&order=DESC&orderby=date');
foreach ($postslist as $post) :
setup_postdata($post);
?>
<div>
<?php the_date(); ?>
<br />
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
<?php the_excerpt(); ?>
</div>
<?php endforeach; ?>
For more information:
For more information on how to use your WP data in other parts of your website look here and here
How to Display Your Public IP Address in the Shell Prompt
Type the following in to the terminal to display your public ip address
curl -s myip.dk |grep '"Box"' | egrep -o '[0-9.]+'
Commonly used HTML markup
Here is a link to my html crib sheet, which contains examples of commonly used tags for reference.
how to CGI
Here is a link to my CGI how to sheet, which contains examples of how to use python on the server side to process data from forms and generate dynamic content.
how to download YouTube™ videos using 'Safari™'
cmd + alt + "a" to see activities window choose (double click) largest files (or changing file size) to download. file will be saved in download folder as eg "video.flv" use Prism to convert and re-size for ipod
or.....(via Lifehacker)
Open any YouTube video then in the video's URL, switch out the "Y" in "Youtube" for a 3
How to insert data from your WordPress™ Blog into your webpage including attachments eg images:
As before you must....
You must have WP blog available on your server..the:
require('../wp/wp-blog-header.php')
below shows example of relative path to wp-blog
<?php
// turn off WordPress themes and include the WordPress core:
define('WP_USE_THEMES', false);
require('../wp/wp-blog-header.php');`
?>
<?php
$postslist = get_posts('numberposts=7&order=DESC&orderby=date');
foreach ($postslist as $post) :
setup_postdata($post);
?>
<div>
<?php the_date(); ?>
<br />
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
<?php the_excerpt(); ?>
---from here---
<?php
$args = array(
'post_type' => 'attachment',
'numberposts' => -1,
'post_status' => null,
'post_parent' => $post->ID
);
$attachments = get_posts($args);
if ($attachments) {
foreach ($attachments as $attachment) {
// echo apply_filters('the_title', $attachment->post_title);
the_attachment_link($attachment->ID, false);
}
}
?>
---to here---
is the new bit of code that inserts the attachments
</div>
<?php endforeach; ?>
For more information:
For more information on how to use your WP data in other parts of your website look here and here
return to previous page
Quick links
The Maker CMS
The ONLY way to deploy and manage your websites!…
How To's
Hobby Time
Mobile Me
Python
Python411
FA Parkes
Your one stop shop for hardware…
ParcelPod
Mail and Parcel delivery solution…


