My Templates

From The World according to Vissie
Jump to navigation Jump to search

Keyboard commands

This template is for keyboard commands.

Example: {{Key|Ctrl+v}}

Will produce: Ctrl+v

File locations

This template is for file locations.

Example: {{File|/etc/X11/xorg.conf}}

Will produce: /etc/X11/xorg.conf

Root commands

This template is for commands which must be run by the root user.

Example: {{Root|emerge --ask -uDNvt @world}}

Will produce:

emerge --ask -uDNvt @world

Warnings

This template is for important warnings.

Example: {{Warning|The reactor may be destroyed if you disable the cooling system. As a result, a large area around the reactor may become dangerously radioactive. If this happens, seek medical assistance immediately.}}

Will produce:

Warning: The reactor may be destroyed if you disable the cooling system. As a result, a large area around the reactor may become dangerously radioactive. If this happens, seek medical assistance immediately.

Notes

This template is for items which should be noted by the user, but are not important enough to be a Warning.

Example: {{Note|If the system <b>reports <i>that</i></b><i> it is out</i> of disk space, but still shows free space in the output of "df", the problem could by that the filesystem has run out of free inodes. In this case you might consider increasing this number when creating the filesystem. For example: {{Root|mke2fs /dev/sdb2 -N 1000000 -m 0 -L eeepc_root}} }}

Will produce:

Note: If the system reports that it is out of disk space, but still shows free space in the output of "df", the problem could by that the filesystem has run out of free inodes. In this case you might consider increasing this number when creating the filesystem. For example:
mke2fs /dev/sdb2 -N 1000000 -m 0 -L eeepc_root

Source Code

This template is for highlighting Source code.

Example: {{Source|/etc/acpi/lid.sh|<source lang=bash> #!/bin/sh lidnum=`echo $1 | sed 's/.*\(LID[^ ]*\).*/\1/'` grep open /proc/acpi/button/lid/$lidnum/state > /dev/null if [ $? -eq 0 ]; then /usr/bin/radeontool light on else /usr/bin/radeontool light off fi </source> }}

Will produce:

vim: /etc/acpi/lid.sh
  #!/bin/sh
  lidnum=`echo $1 | sed 's/.*\(LID[^ ]*\).*/\1/'`
  grep open /proc/acpi/button/lid/$lidnum/state > /dev/null
  if [ $? -eq 0 ]; then
	/usr/bin/radeontool light on
  else
	/usr/bin/radeontool light off
  fi

For a list of Supported languages, visit: http://www.mediawiki.org/wiki/Extension:SyntaxHighlight_GeSHi#Supported_languages