Difference between pages "Subarches" and "ConsoleOutput MediaWiki Extension"

(Difference between pages)
(amd64-piledriver)
 
 
Line 1: Line 1:
{{:Install/Header}}
+
The ConsoleOutput MediaWiki extension was created by Daniel Robbins to provide highlighting of user input for interactive terminal session blocks. To use it, surround user input with  <tt>&lt;console&gt;</tt> opening and closing tags, and put a <tt>##i##</tt> input code immediately before user input on each line. This will cause all text from the <tt>##i##</tt> point to the end of the line to be in a darker color. The rest of the text will be in a lighter grey, allowing it to be distinguished more easily from user input. Here are other sequences that can be used:
= Funtoo Linux Sub-Architectures =
+
__NOTITLE__
+
This page provides an overview of Funtoo Linux sub-architectures (also called ''subarches'',) designed for quick and easy reference. While this information is available in other places, such as Wikipedia, it often takes some time to study and cross-reference the various articles to get a good understanding of each type of sub-architecture, and this information generally isn't all collected neatly in one place. That is the purpose of this page. When possible, links to more detailed Wikipedia pages are provided. You are encouraged to help maintain this page as well as the Wikipedia articles referenced here.
+
  
== 64-bit Suport (Generic) ==
+
* <tt>##b##</tt> - highlight the rest of the line in bold.
 +
* <tt>##b## text here ##!b##</tt> - highlight the text between both markers in bold.
 +
* <tt>##i## text here ##!i##</tt> - highlight the text between both markers in a darker color.
  
=== generic_64 ===
+
This extension can be further extended to add color support, as desired, and some of the CSS for color support can already be found in the code below.
  
The '''generic_64''' subarch is designed to support 64-bit PC-compatible CPUs, such as the [[Wikipedia:AMD_K8|AMD K8-series processors]], which were introduced in late 2003. They were notable as the first processors that supported the [[Wikipedia:X86-64|AMD64 (also called X86-64) 64-bit instruction set]] for PC-compatible systems, which was introduced as a backwards-compatible 64-bit alternative to Intel's IA-64 architecture. Intel followed suit and also began supporting this 64-bit instruction set, which they called "[[Wikipedia:X86-64#Intel_64|Intel 64]]", by releasing X86-64 64-bit compatible CPUs from mid-2004 onwards (See [[Wikipedia:X86-64#Intel_64_implementations|Intel 64 implementations]].)
+
Here are a few examples of the ConsoleOutput extension. First this is how you might typically display {{c|ls}} output, with a particular directory highlighted:
  
AMD desktop 64-bit CPUs include the Athlon 64, Athlon 64 FX, Athlon 64 X2, Athlon X2, Turion 64, Turion 64 X2 and Sempron series processors. AMD server processors were released under the Opteron brand and have codenames SledgeHammer, Venus, Troy, Athens, Denmark, Italy, Egypt, Santa Ana and Santa Rosa. All Opterons released through late 2006 were based on the K8 microarchitecture with original X86-64 instructions.
 
 
== 64-bit AMD Processors ==
 
 
=== amd64-k10 ===
 
 
<console>
 
<console>
CFLAGS: -march=amdfam10 -O2 -pipe
+
www@www-smw ~/public_html $ ##i##ls
CHOST: x86_64-pc-linux-gnu
+
COPYING  LocalSettings.php    api.php  ##b##extensions##!b##  index.php  maintenance          redirect.php    skins              thumb_handler.php5
USE: mmx sse sse2 sse3 3dnow 3dnowext
+
CREDITS  README                api.php5  images        index.php5  mw-config            redirect.php5  tests              wiki.phtml
 +
FAQ      RELEASE-NOTES-1.19    bin      img_auth.php  languages  opensearch_desc.php  redirect.phtml  thumb.php
 +
HISTORY  StartProfiler.sample  cache    img_auth.php5  load.php    opensearch_desc.php5  resources      thumb.php5
 +
INSTALL  UPGRADE              docs      includes      load.php5  profileinfo.php      serialized      thumb_handler.php
 +
www@www-smw ~/public_html $ ##i##cd extensions/
 
</console>
 
</console>
  
CPUs based on AMD Family 10h cores with x86-64 instruction set support. (This supersets MMX, SSE, SSE2, SSE3, SSE4A, 3DNow!, enhanced 3DNow!, ABM and 64-bit instruction set extensions.)
+
And here is how you might display a more detailed example of console output, using colors:
  
The '''amd64-k10''' subarch provides support for the [[Wikipedia:AMD_10h|AMD Family 10h processors]], which were released in late 2007 as a successor to the AMD K8 series processors.
+
{{console|body=
 +
# ##i##bluetoothctl
 +
[##g##NEW##!g##] Controller 00:02:72:C9:62:65 antec [default]
 +
##bl##[bluetooth]##!bl### ##i##power on
 +
Changing power on succeeded
 +
##bl##[bluetooth]##!bl### ##i##agent on
 +
Agent registered
 +
##bl##[bluetooth]##!bl### ##i##scan on
 +
Discovery started
 +
##bl##[bluetooth]##!bl### ##i##devices
 +
Device 00:1F:20:3D:1E:75 Logitech K760
 +
##bl##[bluetooth]##!bl### ##i##pair 00:1F:20:3D:1E:75
 +
Attempting to pair with 00:1F:20:3D:1E:75
 +
[##y##CHG##!y##] Device 00:1F:20:3D:1E:75 Connected: yes
 +
##r##[agent]##!r## Passkey: 454358
 +
##r##[agent]##!r## Passkey: ##i##4##!i##54358
 +
##r##[agent]##!r## Passkey: ##i##45##!i##4358
 +
##r##[agent]##!r## Passkey: ##i##454##!i##358
 +
##r##[agent]##!r## Passkey: ##i##4543##!i##58
 +
##r##[agent]##!r## Passkey: ##i##45435##!i##8
 +
##r##[agent]##!r## Passkey: ##i##454358##!i##
 +
[##y##CHG##!y##] Device 00:1F:20:3D:1E:75 Paired: yes
 +
Pairing successful
 +
[##y##CHG##!y##] Device 00:1F:20:3D:1E:75 Connected: no
 +
##bl##[bluetooth]##!bl### ##i##connect 00:1F:20:3D:1E:75
 +
Attempting to connect to 00:1F:20:3D:1E:75
 +
[##y##CHG##!y##] Device 00:1F:20:3D:1E:75 Connected: yes
 +
Connection successful
 +
##bl##[bluetooth]##!bl### ##i##quit
 +
[##r##DEL##!r##] Controller 00:02:72:C9:62:65 antec [default]
 +
#
 +
}}
  
Desktop amd64-k10 CPUs include [[Wikipedia:AMD Phenom|AMD Phenom]], [[Wikipedia:AMD_10h#Phenom_II_Models|AMD Phenom II]] and [[Wikipedia:AMD_10h#Athlon_II_Models|AMD Athlon II]]. Server CPUs include Opterons with codenames Budapest, Barcelona, Suzuka, Shanghai, Istanbul, Lisbon, and Magny-Cours. A full listing of amd64-k10 Opteron models [[Wikipedia:List_of_AMD_Opteron_microprocessors#K10_based_Opterons|can be found here]].
+
To install, make the following modifications to your skin:
  
=== amd64-bulldozer ===
+
<syntaxhighlight lang="css">
<console>
+
--- mediawiki-1.19.1/skins/vector/screen.css    2012-06-13 18:22:39.000000000 +0000
CFLAGS: -march=bdver1 -O2 -pipe
+
+++ public_html/skins/vector/screen.css 2012-08-27 04:34:47.507912892 +0000
CHOST: x86_64-pc-linux-gnu
+
@@ -683,10 +683,47 @@
USE: mmx sse sse2 sse3 sse4 3dnow 3dnowext
+
        list-style-image: url(images/bullet-icon.png);
</console>
+
}
 
+
CPUs based on AMD Family 15h cores with x86-64 instruction set support. (This supersets FMA4, AVX, XOP, LWP, AES, PCL_MUL, CX16, MMX, SSE, SSE2, SSE3, SSE4A, SSSE3, SSE4.1, SSE4.2, ABM and 64-bit instruction set extensions.)
+
-pre {
 
+
-       line-height: 1.3em;
The '''amd64-bulldozer''' subarch supports the [[Wikipedia:Bulldozer (microarchitecture)|AMD bulldozer microarchitecture]] CPUs, which were released from late 2011 through the first quarter of 2012 as a replacement for the [[Wikipedia:AMD_10h|K10 microarchitecture]] CPUs.
+
+/* ConsoleOutput.php start */
Bulldozer desktop CPUs use the [[Wikipedia:Socket_AM3+|AM3+ socket]] and server CPUs use the  [[Wikipedia:Socket_G34|G34 socket]].
+
+
 
+
+.shell, pre, code, tt, div.mw-geshi {
Desktop bulldozer CPUs include the [[Wikipedia:List_of_AMD_FX_microprocessors#.22Zambezi.22_.2832_nm_SOI.29|Zambezi FX-series CPUs]]. Server bulldozer CPUs include Opterons with codenames Zurich (Opteron 3200-series), Valencia (Opteron 4200-series) and Interlagos (Opteron 6200 series). A complete list of Opteron models [[Wikipedia:http://en.wikipedia.org/wiki/Opteron#Opteron_.2832_nm_SOI.29-_First_Generation_Bulldozer_Microarchitecture|can be found here.]].
+
+        font-size: 12px;
 
+
+        font-family: Consolas, 'andale mono','lucida console', monospace;
=== amd64-piledriver ===
+
+}
<console>
+
+
CFLAGS: -march=bdver2 -O2 -pipe
+
+.shell, pre, div.mw-geshi {
CHOST: x86_64-pc-linux-gnu
+
+        background-color: #F8F8FF;
USE: mmx sse sse2 sse3 sse4 3dnow 3dnowext
+
+        line-height: 15px;
</console>
+
+        padding: 10px;
 
+
+        border: none;
AMD Family 15h core based CPUs with x86-64 instruction set support. (This supersets BMI, TBM, F16C, FMA, AVX, XOP, LWP, AES, PCL_MUL, CX16, MMX, SSE, SSE2, SSE3, SSE4A, SSSE3, SSE4.1, SSE4.2, ABM and 64-bit instruction set extensions.)
+
+        border-top: 2px solid #C6C9E0;
 
+
+        border-bottom: 2px solid #C6C9E0;
The '''amd64-piledriver''' subarch supports the [[Wikipedia:Piledriver (microarchitecture)|AMD Piledriver microarchitecture]] produced by AMD from mid-2012 through 2015, which is the successor to the [[Wikipedia:Bulldozer (microarchitecture)|AMD bulldozer microarchitecture]].
+
+        margin: 0;
Piledriver CPUs and APUs are available that use the [[Wikipedia:FM2 Socket|FM2 socket]]. Desktop Piledriver CPUs use the [[Wikipedia:Socket_AM3+|AM3+ socket]]. Server Piledriver CPUs use a variety of sockets, including [[Wikipedia:Socket_AM3+|AM3+]], [[Wikipedia:Socket_C32|C32]] and [[Wikipedia:Socket_G34|G34]].
+
+        overflow-x: auto;
 
+
+        overflow-y: hidden;
Desktop piledriver CPU and APUs include FX-series with codename Vishera (FX-8350, FX-8370),  [[Wikipedia:List_of_AMD_accelerated_processing_unit_microprocessors#Virgo:_.22Trinity.22_.282012.2C_32_nm.29|A-series with codename Trinity]] (A6-5400K, A10-5800K) and [[Wikipedia:http://en.wikipedia.org/wiki/List_of_AMD_accelerated_processing_unit_microprocessors#.22Richland.22_.282013.2C_32_nm.29_2|A-series with codename Richland]].
+
+}
 
+
+
Server piledriver CPUs include Opterons with codenames Delhi (Opteron 3300-series, [[Wikipedia:Socket_AM3+|AM3+]]), Seoul (Opteron 4300-series, [[Wikipedia:Socket_C32|C32]])  and Abu Dhabi (Opteron 6300-series, [[Wikipedia:Socket_G34|G34]]). A full listing of Opteron models [[Wikipedia:Opteron#Opteron_.2832_nm_SOI.29_-_Piledriver_Microarchitecture|is available here]].
+
+.code {
 
+
+        color: #666;
Piledriver adds several new instructions over bulldozer, so AMD bulldozer systems cannot run amd64-piledriver-optimized stages. However, this subarch is  instruction-compatible with its successor, the, so amd64-piledriver stages can run on amd64-steamroller systems, and vice versa.
+
+}
 
+
+
=== amd64-steamroller ===
+
+.code_input {
 
+
+        color: #000;
The '''amd64-steamroller''' subarch supports the  [[Wikipedia:Steamroller (microarchitecture)|AMD steamroller microarchitecture]], produced from early 2014. It is the successor to the [[Wikipedia:Piledriver (microarchitecture)|AMD Piledriver microarchitecture]].
+
}
Steamroller APUs are available that use the [[Wikipedia:FM2+ Socket|FM2+ socket]] and  [[Wikipedia:Socket_FP3|FP3 socket]] (mobile.)
+
 
+
+.code_red {
Desktop steamroller APUs include the [[Wikipedia:AMD_Accelerated_Processing_Unit#Steamroller_architecture_.282014.29:_Kaveri|A-Series with codename Kaveri]], such as the quad-core AMD A10-7850K APU. Steamroller APUs are also available in mobile versions. Server steamroller APUs will include the codename Berlin APUs, which are expected to be released some time in 2015.
+
+        color: #f00;
 
+
+}
Amd64-steamroller subarches are instruction-compatible with amd64-piledriver, but add new instructions over amd64-bulldozer.
+
+
 
+
+.code_blue {
=== amd64-jaguar ===
+
+        color: #00f;
 
+
+}
The '''amd64-jaguar''' (also called AMD Family 16h) subarch supports the  [[Wikipedia:Jaguar (microarchitecture)|AMD jaguar microarchitecture]], which is targeted at low-power devices, including notebooks, tablets and small form-factor desktops and servers. It is perhaps most well-known for being the microarchitecture used for the [[Wikipedia:Playstation 4|Playstation 4]] and [[Wikipedia:Xbox One|Xbox One]], which each use custom 8-core Jaguar APUs.
+
+
Socketed Jaguar APUs use the [[Wikipedia:AM1 Socket|AM1 socket]], and  [[Wikipedia:Socket_FT3|FT3 socket]] for mobile devices. G-series [[Wikipedia:System_on_a_chip|"system on a chip" (SoC)]] APUs are available for non-socketed devices such as tablets and embedded system boards.
+
+.shell_green {
 
+
+        color: #080;
Desktop Jaguar APUs include the [[Wikipedia:List_of_AMD_accelerated_processing_unit_microprocessors#.22Kabini.22.2C_.22Temash.22_.282013.2C_28_nm.29|Kabini A-series APUs and Temash E-series APUs]], such as the Athlon 5150 and 5350 APUs, and Sempron 2650 and 3850.
+
+}
 
+
+
Amd64-jaguar subarches use the MOVBE instruction which is not available on amd64-bulldozer, amd64-piledriver or amd64-steamroller. They are thus not instruction-compatible with any of these subarches.
+
+/* ConsoleOutput.php end */
 
+
+
== 64-bit Intel Processors ==
+
/* Site Notice (includes notices from CentralNotice extension) */
 
+
  #siteNotice {
=== corei7 ===
+
        font-size: 0.8em;
<console>
+
</syntaxhighlight>
CFLAGS: -march=corei7 -O2 -pipe
+
CHOST: x86_64-pc-linux-gnu
+
USE: mmx sse sse2 sse3 ssse3 sse4
+
</console>
+
Intel Core i7 CPU with 64-bit extensions, MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1 and SSE4.2 instruction set support.  
+
 
+
Introduced November of 2008, the '''corei7''' subarch supports the [[Wikipedia:Nehalem_(microarchitecture)|Nehalem microarchitecture]], [[Wikipedia:Sandy_Bridge_(microarchitecture)|Sandy Bridge microarchitecture]], [[Wikipedia:Ivy_Bridge_(microarchitecture)|Ivy Bridge microarchitecture]], and [[Wikipedia:Haswell_(microarchitecture)|Haswell microarchitecture]].
+
 
+
=== core2_64 ===
+
<console>
+
CFLAGS: -march=core2 -O2 -pipe
+
CHOST: x86_64-pc-linux-gnu
+
USE: mmx sse sse2 sse3 ssse3
+
</console>
+
 
+
Intel Core 2 CPU with 64-bit extensions, MMX, SSE, SSE2, SSE3 and SSSE3 instruction set support.  
+
 
+
The '''core2_64''' subarch supports 64-bit-capable [[Wikipedia:Intel_Core_2|Intel Core 2 Processors]], which includes ''some'' processors of the [[Wikipedia:Intel Core (microarchitecture)|Core]] and all processors of the [[Wikipedia:Penryn_(microarchitecture)|Penryn]] microarchitecture. All "Core 2" branded processors are 64-bit-capable. These processors were introduced in July of 2006 and were phased out in July of 2011, in favor of  [[Wikipedia:Nehalem_(microarchitecture)|Nehalem-based]] processors.
+
 
+
For a full list of 64-bit capable Core 2 processors, [http://ark.intel.com/search/advanced?s=t&FamilyText=Legacy%20Intel%C2%AE%20Core%E2%84%A22%20Processor&InstructionSet=64-bit see this link].
+
 
+
The 64-bit capable ''Core 2''-branded CPUs include: "Conroe"/"Allendale" (dual-core for desktops), "Merom" (dual-core for laptops), "Merom-L" (single-core for laptops), "Kentsfield" (quad-core for desktops), and the updated variants named "Wolfdale" (dual-core for desktops), "Penryn" (dual-core for laptops), and "Yorkfield" (quad-core for desktops). (Note: ''For the server and workstation "Woodcrest", "Tigerton", "Harpertown" and "Dunnington" CPUs see the [[Wikipedia:Xeon|Xeon]] brand''.)
+
 
+
=== atom_64 ===
+
<console>
+
CFLAGS: -O2 -fomit-frame-pointer -march=atom -pipe -mno-movbe
+
CHOST: x86_64-pc-linux-gnu
+
USE: mmx sse sse2 sse3
+
</console>
+
  
Intel Atom CPU with 64-bit extensions MMX, SSE, SSE2, SSE3 and SSSE3 instruction set support.  
+
Then install the following code in your <tt>extensions</tt> directory and include it with a <tt>require_once( "$IP/extensions/ConsoleOutput.php" );</tt> in <tt>LocalSettings.php</tt>:
  
The Intel Atom Processor is the common name for Intel'[[Wikipedia:Bonnell_(microarchitecture)|Bonnell microarchitecture]], which represents a partial revival of the principles used in earlier Intel designs such as P5 and the i486, with the sole purpose of enhancing the performance per watt ratio.  Successor to the [[Wikipedia:Stealey_(microprocessor)|Intel A100 series (Stealey)]], which was derived from the [[Wikipedia:Pentium_M|Pentium M]], the Intel Atom has been produced since 2008. Targeted at low-power devices, Atom processors can be found in a wide range of notebooks, tablets and small form-factor desktops and servers.
+
<syntaxhighlight lang="php">
 +
<?php
 +
$wgExtensionCredits['validextensionclass'][] = array(
 +
    'name' => 'ConsoleOutput',
 +
    'author' => 'Daniel Robbins',
 +
    'url' => 'https://github.com/danielrobbins/mediawiki-consoleoutput',
 +
    'description' => 'This extension allows you to display colorized console output in mediawiki'
 +
);
  
The '''atom_64''' sub-architecture supports 64-bit capable Intel Atom CPUs.  The first 64-bit capable Intel Atom CPUs were the Intel Atom 230 and 330, released in late 2008. However, Intel also continued to produce new 32-bit Atom Processors after this date. For example, the Atom N2xx series Atom Diamondville models cannot support 64-bit operation, while the 2xx and 3xx Diamondville, Pineview, Cedarview and Centerton can. A full list of 64-bit capable Intel Atom Processors [http://ark.intel.com/search/advanced?s=t&FamilyText=Intel%C2%AE%20Atom%E2%84%A2%20Processor&InstructionSet=64-bit can be seen here.]
+
if ( defined( 'MW_SUPPORTS_PARSERFIRSTCALLINIT' ) ) {
 +
        $wgHooks['ParserFirstCallInit'][] = 'consoleOutputSetup';
 +
} else {
 +
        $wgExtensionFunctions[] = 'consoleOutputSetup';
 +
}
  
{{Important|For 64-bit support to be functional, a 64-bit capable Atom Processor must be paired ''with a processor, chipset, and BIOS'' that all support [[Wikipedia:X86-64#Intel_64|Intel 64]]. If not all hardware supports 64-bit, then you must use the [[subarches#atom_32|atom_32]] subarch instead.}}
+
function consoleOutputSetup( $data )
 +
{
 +
    global $wgParser;
 +
    $wgParser->setHook('console', 'consoleRender');
 +
    return true;
 +
}
  
== 32-bit Suport (Generic) ==
+
function consoleRender($input, $args, $parser)
=== generic_32 ===
+
{
 +
    if (count($args))
 +
    {
 +
        return "<strong class='error'>" .
 +
              "ConsoleOutput: arguments not supported" .
 +
              "</strong>";
 +
    }
  
== 32-bit AMD Processors ==
+
    # Display < and > as literals, so escape them:
=== amd64-k8_32 ===
+
=== athlon-xp ===
+
  
== 32-bit ARM Processors ==
+
    $input = preg_replace('/>/','&gt;', $input);
=== armv5te ===
+
    $input = preg_replace('/</','&lt;', $input);
=== armv6j_hardfp ===
+
=== armv7a_hardfp ===
+
  
== 32-bit Intel Processors ==
+
    # http://www.perlmonks.org/?node_id=518444
=== atom_32 ===
+
    # See "Matching a pattern that doesn't include another pattern:
=== core2_32 ===
+
=== i686 ===
+
=== pentium4 ===
+
  
 +
    $input = preg_replace('/##i##((?:(?!##!i##).)*)##!i##/','<span class="code_input">$1</span>', $input);
 +
    $input = preg_replace('/##i##(.*)/','<span class="code_input">$1</span>', $input);
 +
    $input = preg_replace('/##b##((?:(?!##!b##).)*)##!b##/','<b>$1</b>', $input);
 +
    $input = preg_replace('/##b##(.*)/','<b>$1</b>', $input);
 +
    return "<pre class=\"code\">" . $input . "&lt;/pre>";
 +
}
 +
?>
 +
</syntaxhighlight>
  
{{:Install/Footer}}
+
[[Category:MediaWiki Hacks]]

Revision as of 01:05, January 12, 2015

The ConsoleOutput MediaWiki extension was created by Daniel Robbins to provide highlighting of user input for interactive terminal session blocks. To use it, surround user input with <console> opening and closing tags, and put a ##i## input code immediately before user input on each line. This will cause all text from the ##i## point to the end of the line to be in a darker color. The rest of the text will be in a lighter grey, allowing it to be distinguished more easily from user input. Here are other sequences that can be used:

  • ##b## - highlight the rest of the line in bold.
  • ##b## text here ##!b## - highlight the text between both markers in bold.
  • ##i## text here ##!i## - highlight the text between both markers in a darker color.

This extension can be further extended to add color support, as desired, and some of the CSS for color support can already be found in the code below.

Here are a few examples of the ConsoleOutput extension. First this is how you might typically display ls output, with a particular directory highlighted:

www@www-smw ~/public_html $ ls
COPYING  LocalSettings.php     api.php   extensions   index.php   maintenance           redirect.php    skins              thumb_handler.php5
CREDITS  README                api.php5  images         index.php5  mw-config             redirect.php5   tests              wiki.phtml
FAQ      RELEASE-NOTES-1.19    bin       img_auth.php   languages   opensearch_desc.php   redirect.phtml  thumb.php
HISTORY  StartProfiler.sample  cache     img_auth.php5  load.php    opensearch_desc.php5  resources       thumb.php5
INSTALL  UPGRADE               docs      includes       load.php5   profileinfo.php       serialized      thumb_handler.php
www@www-smw ~/public_html $ cd extensions/

And here is how you might display a more detailed example of console output, using colors:

# bluetoothctl 
[NEW] Controller 00:02:72:C9:62:65 antec [default]
[bluetooth]# power on
Changing power on succeeded
[bluetooth]# agent on
Agent registered
[bluetooth]# scan on
Discovery started
[bluetooth]# devices
Device 00:1F:20:3D:1E:75 Logitech K760
[bluetooth]# pair 00:1F:20:3D:1E:75
Attempting to pair with 00:1F:20:3D:1E:75
[CHG] Device 00:1F:20:3D:1E:75 Connected: yes
[agent] Passkey: 454358
[agent] Passkey: 454358
[agent] Passkey: 454358
[agent] Passkey: 454358
[agent] Passkey: 454358
[agent] Passkey: 454358
[agent] Passkey: 454358
[CHG] Device 00:1F:20:3D:1E:75 Paired: yes
Pairing successful
[CHG] Device 00:1F:20:3D:1E:75 Connected: no
[bluetooth]# connect 00:1F:20:3D:1E:75
Attempting to connect to 00:1F:20:3D:1E:75
[CHG] Device 00:1F:20:3D:1E:75 Connected: yes
Connection successful
[bluetooth]# quit
[DEL] Controller 00:02:72:C9:62:65 antec [default]
#


To install, make the following modifications to your skin:

--- mediawiki-1.19.1/skins/vector/screen.css    2012-06-13 18:22:39.000000000 +0000
+++ public_html/skins/vector/screen.css 2012-08-27 04:34:47.507912892 +0000
@@ -683,10 +683,47 @@
        list-style-image: url(images/bullet-icon.png);
 }
 
-pre {
-       line-height: 1.3em;
+/* ConsoleOutput.php start */
+
+.shell, pre, code, tt, div.mw-geshi {
+        font-size: 12px;
+        font-family: Consolas, 'andale mono','lucida console', monospace;
+}
+
+.shell, pre, div.mw-geshi {
+        background-color: #F8F8FF;
+        line-height: 15px;
+        padding: 10px;
+        border: none;
+        border-top: 2px solid #C6C9E0;
+        border-bottom: 2px solid #C6C9E0;
+        margin: 0;
+        overflow-x: auto;
+        overflow-y: hidden;
+}
+
+.code {
+        color: #666;
+}
+
+.code_input {
+        color: #000;
 }
 
+.code_red {
+        color: #f00;
+}
+
+.code_blue {
+        color: #00f;
+}
+
+.shell_green {
+        color: #080;
+}
+
+/* ConsoleOutput.php end */
+
 /* Site Notice (includes notices from CentralNotice extension) */
 #siteNotice {
        font-size: 0.8em;

Then install the following code in your extensions directory and include it with a require_once( "$IP/extensions/ConsoleOutput.php" ); in LocalSettings.php:

<?php
$wgExtensionCredits['validextensionclass'][] = array(
    'name' => 'ConsoleOutput',
    'author' => 'Daniel Robbins',
    'url' => 'https://github.com/danielrobbins/mediawiki-consoleoutput',
    'description' => 'This extension allows you to display colorized console output in mediawiki'
);
 
if ( defined( 'MW_SUPPORTS_PARSERFIRSTCALLINIT' ) ) {
        $wgHooks['ParserFirstCallInit'][] = 'consoleOutputSetup';
} else {
        $wgExtensionFunctions[] = 'consoleOutputSetup';
}
 
function consoleOutputSetup( $data )
{
    global $wgParser;
    $wgParser->setHook('console', 'consoleRender');
    return true;
}
 
function consoleRender($input, $args, $parser)
{
    if (count($args))
    {
        return "<strong class='error'>" .
               "ConsoleOutput: arguments not supported" .
               "</strong>";
    }
 
    # Display < and > as literals, so escape them:

    $input = preg_replace('/>/','&gt;', $input);
    $input = preg_replace('/</','&lt;', $input);
 
    # http://www.perlmonks.org/?node_id=518444
    # See "Matching a pattern that doesn't include another pattern:

    $input = preg_replace('/##i##((?:(?!##!i##).)*)##!i##/','<span class="code_input">$1</span>', $input);
    $input = preg_replace('/##i##(.*)/','<span class="code_input">$1</span>', $input);
    $input = preg_replace('/##b##((?:(?!##!b##).)*)##!b##/','<b>$1</b>', $input);
    $input = preg_replace('/##b##(.*)/','<b>$1</b>', $input);
    return "<pre class=\"code\">" . $input . "&lt;/pre>";
}
?>