Skip to content

Instantly share code, notes, and snippets.

View nobodyguy's full-sized avatar

Jan nobodyguy

  • ExpertaLabs
  • Brno, Czech Republic
View GitHub Profile
@nobodyguy
nobodyguy / gist:9936036
Last active August 29, 2015 13:58
PowerShell HTTP server with forced 500 response code
$listener = New-Object System.Net.HttpListener
$listener.Prefixes.Add('http://+:8000/') # Must exactly match the netsh command above
$listener.Start()
Write-Host "Listening..."
while ($listener.IsListening) {
$context = $listener.GetContext() # blocks until request is received
$request = $context.Request
@nobodyguy
nobodyguy / template.latte
Last active August 29, 2015 13:56
Nette invoice form - manual rendering
{block #content}
<h1 n:block="title">Vystavit fakturu</h1>
{form invoiceForm class => form}
<legend>Faktura</legend>
<p>
<a class="btn btn-primary" href="#" id="importButton"><i class="icon-circle-arrow-right icon-white"></i> Importovat</a>
</p>
<div class="control-group" style="display:none;" id="import">