Skip to content

Instantly share code, notes, and snippets.

View multinerd's full-sized avatar
💭
Nerding out

Multinerd multinerd

💭
Nerding out
View GitHub Profile
Checking minimum requirements...
Creating volumes for persistent storage...
Created sentry-data.
Created sentry-postgres.
Created sentry-redis.
Created sentry-zookeeper.
Created sentry-kafka.
Created sentry-clickhouse.
Created sentry-symbolicator.
#Windows 10 Decrapifier 1803/1809
#By CSAND
#Oct 5 2018
#
#
#PURPOSE: Eliminate much of the bloat that comes with Windows 10.
#
# Change many privacy settings to be off by default. Remove
# built-in advertising, Cortana, OneDrive, Cortana stuff
# (all optional).

Setup multiple git identities & git user informations

/!\ Be very carrefull in your setup : any misconfiguration make all the git config to fail silently ! Go trought this guide step by step and it should be fine 😉

Setup multiple git ssh identities for git

  • Generate your SSH keys as per your git provider documentation.
  • Add each public SSH keys to your git providers acounts.
  • In your ~/.ssh/config, set each ssh key for each repository as in this exemple:
@multinerd
multinerd / test.js
Last active December 19, 2018 18:17
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory(require("lodash"));
else if(typeof define === 'function' && define.amd)
define("formio-export", ["_"], factory);
else if(typeof exports === 'object')
exports["formio-export"] = factory(require("lodash"));
else
root["formio-export"] = factory(root["_"]);
})(window, function(__WEBPACK_EXTERNAL_MODULE__0__) {
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.1.3/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/formiojs@3.9.4/dist/formio.full.min.css">
</head>
<body>

Using Signature Pad with ASP.NET MVC

By Hendy Tarnando · October 23, 2016 · Updated April 5, 2018ASP.NET

Signature Pad is a JavaScript library that allows you to capture user signatures in desktop and mobile browsers. It's HTML5 canvas based and uses variable width Bézier curve interpolation for smooth signature drawing. The other good thing about the library is it doesn't depend on jQuery.

In this tutorial, you will learn how to use the Signature Pad library in an ASP.NET MVC web application. Additionally, you will learn how to work with ASP.NET MVC display templates and editor templates.

Data Types for Signature Images

@multinerd
multinerd / 7-zip-default-extract.reg
Created June 17, 2018 05:32 — forked from zabbarob/7-zip-default-extract.reg
Make 7-Zip extract to folder when double-clicking archives. (based on http://superuser.com/a/447791)
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\7-Zip.001\shell]
@="extract"
[HKEY_CLASSES_ROOT\7-Zip.001\shell\extract]
@="Extract to Folder"
[HKEY_CLASSES_ROOT\7-Zip.001\shell\extract\command]
@="\"C:\\Program Files\\7-Zip\\7zG.exe\" x \"%1\" -o*"
[HKEY_CLASSES_ROOT\7-Zip.7z\shell]

// @class = "form-control"
// When using editortemplates, this class is important

  <div class="md-form">
    @Html.LabelFor(model => model.Date, htmlAttributes: new { @class = "" }, labelText: $"Date Of Incident (ex: {DateTime.Now.ToString(CultureInfo.CurrentCulture)})")
    @Html.EditorFor(model => model.Date, new { htmlAttributes = new { @class = "form-control", type = "text" } })
    @Html.ValidationMessageFor(model => model.Date, "", new { @class = "text-danger" })
  </div>
public static class MvcHtmlHelpers
{
/// <summary>
/// Renders checkbox as one input (normal Html.CheckBoxFor renders two inputs: checkbox and hidden)
/// </summary>
public static MvcHtmlString BasicCheckBoxFor<T>(this HtmlHelper<T> html, Expression<Func<T, bool>> expression, object htmlAttributes = null)
{
var tag = new TagBuilder("input");
tag.Attributes["type"] = "checkbox";