Skip to content

Instantly share code, notes, and snippets.

View mszynka's full-sized avatar

Mateusz Szynka mszynka

View GitHub Profile
@mszynka
mszynka / CreateTableIfNotExistsOperation.cs
Last active September 14, 2023 06:09
EF Core - Create table if not exists
using Microsoft.EntityFrameworkCore.Migrations.Operations;
namespace Gist.Extensions.Sql
{
internal sealed class CreateTableIfNotExistsOperation : CreateTableOperation
{
}
}
@mszynka
mszynka / README.md
Created March 30, 2016 18:57
Custom login message (motd) script

#Custom login message

Example

Last login: Wed Oct 22 21:12:10 2015 from *****
  ___  ___ _____                     _  
  |  \/  |/  ___|                   | | 
  | .  . |\ `--.  ____ _   _  _ __  | | __  __ _ 
  | |\/| | `--. \|_  /| | | || `_ \ | |/ / / _` |
  | |  | |/\__/ / / / | |_| || | | ||   < | (_| |
  \_|  |_/\____/ /___| \__, ||_| |_||_|\_\ \__,_|

__/ |

@mszynka
mszynka / index.html
Last active September 21, 2015 19:52
Image lazy loader
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta charset="utf-8">
</head>
<body>
<img class="lazy"><noscript><img src="images/test1.png"></noscript>
<script src="script.js"></script>
</body>
</html>
@mszynka
mszynka / mediator.js
Last active September 21, 2015 19:27 — forked from piotrlewandowski/mediator.js
JS Mediator Pattern Implementation
var mediator = (function() {
'use strict';
var
subscribe = function(channel, fn) {
if (!mediator.channels[channel]) {
mediator.channels[channel] = [];
}
mediator.channels[channel].push({ context: this, callback: fn });
@mszynka
mszynka / index.html
Last active September 21, 2015 20:57
CSS stylesheet lazyloader
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta charset="utf-8">
<title>LazyLoader</title>
<noscript>
<link href="style.css" rel="stylesheet">
</noscript>
</head>
<body>