Skip to content

Instantly share code, notes, and snippets.

View karl-sjogren's full-sized avatar

Karl-Johan Sjögren karl-sjogren

View GitHub Profile

Regexes to replace Moq with FakeItEasy

Replace Mock with Fake

(new\sMock|Mock\.of)<
A.Fake<

Mock<([a-z]*?)(?:\s*?)>
$1
@karl-sjogren
karl-sjogren / Record.il
Created April 27, 2023 12:51
IL för struct och record
.assembly _
{
.custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = (
01 00 08 00 00 00 00 00
)
.custom instance void [System.Runtime]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = (
01 00 01 00 54 02 16 57 72 61 70 4e 6f 6e 45 78
63 65 70 74 69 6f 6e 54 68 72 6f 77 73 01
)
.custom instance void [System.Runtime]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [System.Runtime]System.Diagnostics.DebuggableAttribute/DebuggingModes) = (
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<canvas id="cv" width="400" height="400"></canvas>
<script id="jsbin-javascript">
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<canvas id="myCanvas" width="1024" height="1024">
Your browser does not support the HTML5 canvas tag.

Ice cream eating rules

New ice creams

May only be tested on fridays with at least one other colleague.

Old (or already tested) ice creams

May be enjoyed whenever.

var defaultImageUrl = 'http://localhost:51808/covers/default';
var defaultImageData = null;
self.addEventListener('install', function(event) {
var promise = fetch(defaultImageUrl).then((response) => {
return response.blob();
}).then((image) => {
defaultImageData = image;
});
event.waitUntil(promise);
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>Ember</title>
<link href="http://netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet">
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="http://builds.handlebarsjs.com.s3.amazonaws.com/handlebars-v1.3.0.js"></script>
<script src="http://builds.emberjs.com/release/ember.js"></script>
</head>
Section "Office Addins"
; To make this check you need the FindProc-plugin for NSIS and the
; macro defined below in the article.
!insertmacro CheckAppRunning "OUTLOOK" "OUTLOOK.EXE" "Microsoft Outlook"
!insertmacro CheckAppRunning "EXCEL" "EXCEL.EXE" "Microsoft Excel"
!insertmacro CheckAppRunning "WORD" "WINWORD.EXE" "Microsoft Word"
!insertmacro CheckAppRunning "POWERPOINT" "POWERPOINT.EXE" "Microsoft PowerPoint"
SetOutPath "$INSTDIR"
; We need a few files from the Add-in Express folders, you might need