Skip to content

Instantly share code, notes, and snippets.

View mark-szabo's full-sized avatar
👨‍💻
Yippee, open-source!

Mark Szabo mark-szabo

👨‍💻
Yippee, open-source!
View GitHub Profile
@mark-szabo
mark-szabo / DigitRecognizerBot.cs
Last active November 21, 2019 17:18
Digit Recognizer Bot Workshop
if (turnContext.Activity.Attachments != null && turnContext.Activity.Attachments.Any())
{
// We know the user is sending an attachment as there is at least one item
// in the Attachments list.
await HandleIncomingAttachmentAsync(turnContext, turnContext.Activity);
return;
}
if (turnContext.Activity.Text?.Trim()?.ToLowerInvariant() == "hi")
{
@mark-szabo
mark-szabo / MNISTPreprocessor.cs
Last active April 28, 2019 20:55
Preprocessing camera images for MNIST-based neural networks
using SixLabors.ImageSharp;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Processing;
using SixLabors.Primitives;
using System;
using System.IO;
namespace ImagePreprocessingService
{
public class MNISTPreprocessor
@mark-szabo
mark-szabo / snake.html
Last active April 19, 2019 09:38
JS snake game in less than 200 lines - http://bit.ly/marksnake
<head>
<style>
html,
body {
width: 100%;
height: 100%;
margin: 0;
}
canvas {
@mark-szabo
mark-szabo / messenger-dark-mode.user.js
Last active July 2, 2020 19:28
Messenger material design dark mode
// ==UserScript==
// @name Messenger dark theme
// @namespace http://tampermonkey.net/
// @version 1.0.7
// @updateURL https://gist.github.com/mark-szabo/7bfd322575686ed4b09c810bd2fd03b2/raw/messenger-dark-mode.user.js
// @downloadURL https://gist.github.com/mark-szabo/7bfd322575686ed4b09c810bd2fd03b2/raw/messenger-dark-mode.user.js
// @description Messenger dark theme
// @author mark-szabo (forked from bibixx)
// @match https://www.messenger.com/*
// @grant none
{
"requirements": [
{
"name": "Windows 10 Fall Creators Update",
"additionalInformation": "build 16299 or later",
"checks": [
{
"checkType": "MinimumRegistryValue",
"registryHive": "LocalMachine",
"registryKey": "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion",