Skip to content

Instantly share code, notes, and snippets.

View kromakollision's full-sized avatar

Koen kromakollision

  • Ghent, Belgium
View GitHub Profile
@kromakollision
kromakollision / get-weakest-link.ts
Created December 16, 2019 15:02
get weakest link
@kromakollision
kromakollision / outlook.html
Created July 4, 2019 10:46
Email webfonts and fallbacks
<!--[if (gte mso 9)|(IE)]>
<style type="text/css" media="screen">
/* Add all text elements used in your email template */
body, div, p, li, th, td,
a, strong, b, em, li, address,
h1, h2, h3, h4, h5, h6 {
font-family: 'Segoe UI Semilight' !important;
}
</style>
<![endif]-->
@kromakollision
kromakollision / mediaquery.html
Created July 4, 2019 10:44
Email webfonts and fallbacks - media query
<style type="text/css" media="screen">
@media screen {
/* Add all text elements used in your email template */
body, div, p, li, th, td,
a, strong, b, em, li, address,
h1, h2, h3, h4, h5, h6 {
font-family: 'Source Sans Pro', sans-serif !important;
}
}
</style>
@kromakollision
kromakollision / service-worker.js
Created July 1, 2019 09:08
This is a basic (untested) service worker setup.
// This is a basic (untested) service worker setup.
// Thoroughly test all features before using it!
// CACHE KEYS
// update CACHE_KEY to trigger:
// - a new service worker install
// - removal of old caches
// The new service worker will become active after closing all
// website instances where it has been registered
const CACHE_KEY = 'cache-v1';
@kromakollision
kromakollision / View.cshtml
Created April 9, 2019 07:42
Server Side React and .NET - View.cshtml 3
@Html.ReactInitJavaScript()
@kromakollision
kromakollision / View.cshtml
Created April 9, 2019 07:41
Server Side React and .NET - View.cshtml 2
@section scripts {
<script src="[path to JavaScript file]"></script>
}
@kromakollision
kromakollision / View.cshtml
Created April 9, 2019 07:39
Server Side React and .NET - View.cshtml
@Html.React("RootComponent", new {title = "This is React SSR"})
<!DOCTYPE html>
@kromakollision
kromakollision / ReactConfig.cs
Created April 9, 2019 07:37
Server Side React and .NET - ReactConfig.cs
.SetLoadBabel(false)
.SetLoadReact(false)
.AddScriptWithoutTransform("[path to JavaScript file]")
@kromakollision
kromakollision / index.html
Created April 9, 2019 07:33
Server Side React and .NET - index.html
<div id="productsApp"></div>