From 0cf4e5c9df33f16e7ea8613ae3e3340e83a84550 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C4=93teris=20Caune?= Date: Fri, 11 Dec 2015 19:18:44 +0200 Subject: [PATCH] PowerShell example on Welcome page. --- hc/front/management/commands/pygmentize.py | 2 ++ templates/front/snippets/powershell.html | 2 ++ templates/front/snippets/powershell.txt | 1 + templates/front/welcome.html | 6 ++++++ 4 files changed, 11 insertions(+) create mode 100644 templates/front/snippets/powershell.html create mode 100644 templates/front/snippets/powershell.txt diff --git a/hc/front/management/commands/pygmentize.py b/hc/front/management/commands/pygmentize.py index 10f05cef..cfac75cd 100644 --- a/hc/front/management/commands/pygmentize.py +++ b/hc/front/management/commands/pygmentize.py @@ -20,4 +20,6 @@ class Command(BaseCommand): _process("crontab.txt", "crontab.html", lexers.BashLexer()) _process("python.txt", "python.html", lexers.PythonLexer()) _process("php.txt", "php.html", lexers.PhpLexer()) + _process("powershell.txt", "powershell.html", + lexers.shell.PowerShellLexer()) _process("node.txt", "node.html", lexers.JavascriptLexer()) diff --git a/templates/front/snippets/powershell.html b/templates/front/snippets/powershell.html new file mode 100644 index 00000000..f238c946 --- /dev/null +++ b/templates/front/snippets/powershell.html @@ -0,0 +1,2 @@ +
Invoke-RestMethod {{ ping_url }}
+
diff --git a/templates/front/snippets/powershell.txt b/templates/front/snippets/powershell.txt new file mode 100644 index 00000000..96a6a1c3 --- /dev/null +++ b/templates/front/snippets/powershell.txt @@ -0,0 +1 @@ +Invoke-RestMethod PING_URL \ No newline at end of file diff --git a/templates/front/welcome.html b/templates/front/welcome.html index 1a7a36da..fc00ade8 100644 --- a/templates/front/welcome.html +++ b/templates/front/welcome.html @@ -50,6 +50,9 @@ + @@ -73,6 +76,9 @@
{% include "front/snippets/browser.html" %}
+
+ {% include "front/snippets/powershell.html" %} +
As an alternative to HTTP/HTTPS requests,