Skip to content

Instantly share code, notes, and snippets.

View mattiasnordqvist's full-sized avatar
🚐
____/\___/\_/\____

Mattias Nordqvist mattiasnordqvist

🚐
____/\___/\_/\____
  • Spinit AB
  • Sverige
View GitHub Profile
@onlurking
onlurking / programming-as-theory-building.md
Last active June 5, 2024 04:46
Programming as Theory Building - Peter Naur

Programming as Theory Building

Peter Naur

Peter Naur's classic 1985 essay "Programming as Theory Building" argues that a program is not its source code. A program is a shared mental construct (he uses the word theory) that lives in the minds of the people who work on it. If you lose the people, you lose the program. The code is merely a written representation of the program, and it's lossy, so you can't reconstruct

@endofcake
endofcake / Dockerfile
Last active May 6, 2024 17:20
Copy *.csproj files during a docker build, preserving the directory structure (kudos to @aidansteele)
COPY src/*/*.csproj ./
RUN for file in $(ls *.csproj); do mkdir -p ${file%.*}/ && mv $file ${file%.*}/; done
@kaushalp
kaushalp / httpsRedirectRule.xml
Created May 8, 2017 14:26
URL Rewrite rule to redirect from HTTP to HTTPS
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="HTTP/S to HTTPS Redirect" enabled="true" stopProcessing="true">
<match url="(.*)" />
<conditions logicalGrouping="MatchAny">
<add input="{SERVER_PORT_SECURE}" pattern="^0$" />
</conditions>
@Danielku15
Danielku15 / Example.html
Created February 25, 2016 19:53
A MediaTypeFormatter for WebApi for multipart/form-data including file uploads
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>File Upload example</title>
<link href="/Content/bootstrap.css" rel="stylesheet" />
</head>
<body>
<form action="api/Upload" method="post">
<div class="form-group">