Thursday, May 27, 2010

Making a programming Blog

First you need to set up what you want the site to look like. For code it is better to have blocks that are separated from the rest of the text
like this block here
This block can be created by using the following HTML/CSS code
<div style="border: 1px solid rgb(51, 51, 51); background-color: rgb(204, 204, 204); padding: 2px; margin: 5px 20px; color: rgb(0, 0, 0);"><tt>
code here
</tt></div>
The <tt> tag is used to make the text inside teletype making it look more like code. By changing the values inside style you can change how the box looks.

Next things are tabs, if you know anything about HTML, tabs and other white space are ignored so you cannot use tabs, what you can do is use div tags with left margins

so you can
do something like this
with multiple indented lines
To do this you use the code
<div style="margin-left: 25px;">
indented code here
</div>

The last thing you need to know is what do do if you are trying to display a tag like <tag> because HTML will think that it is a tag and not something that you want to display
<
>
&
 
"
®
©
&lt;
&gt;
&amp;
&nbsp;
&quot;
&reg;
&copy;
less than
greater than
ampersand
non breaking space
double quote
registered trade mark
copyright

Setting a static IP address on Debian 5.0

To give debian a static IP address change the file
/etc/network/interfaces
Find the line that reads
iface eth0 inet dhcp
and change it to
iface eth0 inet static
address 192.168.1.xxx
netmask 255.255.240.0
gateway 192.168.1.xxx
Where the IP addresses are whichever addresses you need to put in. If the computer was hooked up as DHCP and it connected to the server then the DNS server values are already set (they are contained in a different file) when you are done you can restart the network configurations but the cleanest way is just to restart the computer