Skip to content

Instantly share code, notes, and snippets.

@mvenditto-mydev
mvenditto-mydev / stringConcatenationDotnet8.cs
Created July 8, 2025 12:03 — forked from davepcallan/stringConcatenationDotnet8.cs
.NET 8 simple string concatenation benchmarks
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Columns;
using BenchmarkDotNet.Configs;
using BenchmarkDotNet.Jobs;
using BenchmarkDotNet.Reports;
using System;
using System.Text;
namespace Benchmarks
{
@mvenditto-mydev
mvenditto-mydev / Dockerfile
Created May 14, 2025 07:16 — forked from usr-ein/Dockerfile
Optimal multistaged Dockerfile for poetry
# syntax=docker/dockerfile:1
# Keep this syntax directive! It's used to enable Docker BuildKit
# Based on https://github.com/python-poetry/poetry/discussions/1879?sort=top#discussioncomment-216865
# but I try to keep it updated (see history)
################################
# PYTHON-BASE
# Sets up all our shared environment variables
################################
@mvenditto-mydev
mvenditto-mydev / Dockerfile
Created May 14, 2025 07:16 — forked from usr-ein/Dockerfile
Optimal multistaged Dockerfile for poetry
# syntax=docker/dockerfile:1
# Keep this syntax directive! It's used to enable Docker BuildKit
# Based on https://github.com/python-poetry/poetry/discussions/1879?sort=top#discussioncomment-216865
# but I try to keep it updated (see history)
################################
# PYTHON-BASE
# Sets up all our shared environment variables
################################
@mvenditto-mydev
mvenditto-mydev / format.cs
Created March 21, 2023 09:35 — forked from k-maru/format.cs
T-SQL Format C# Code
class Program {
static void Main(string[] args) {
var query = "select A.ID, A.NAME from (select ID, NAME from BAR) A where A.ID = '1'";
var parser = new TSql120Parser(false);
IList<ParseError> errors;
var parsedQuery = parser.Parse(new StringReader(query), out errors);
if (errors.Count > 0) {
foreach (var err in errors) {
Console.ForegroundColor = ConsoleColor.Red;
Console.WriteLine(err.Message);
@mvenditto-mydev
mvenditto-mydev / split-unspaced-text.js
Created February 15, 2023 11:04 — forked from davidguttman/split-unspaced-text.js
Split text without spaces into list of words
// port of http://stackoverflow.com/questions/8870261/how-to-split-text-without-spaces-into-list-of-words
var _ = require('lodash')
var fs = require('fs')
var tape = require('tape')
var dictStr = fs.readFileSync(__dirname + '/dump/words-by-freq.txt', 'utf8')
var wordsByFreq = dictStr.split('\n')
var maxWord = 0
@mvenditto-mydev
mvenditto-mydev / docker-api-port.md
Created March 31, 2022 14:49 — forked from styblope/docker-api-port.md
Enable TCP port 2375 for external connection to Docker

Enable TCP port 2375 for external connection to Docker

See this issue.
Docker best practise to Control and configure Docker with systemd.

  1. Create daemon.json file in /etc/docker:

     {"hosts": ["tcp://0.0.0.0:2375", "unix:///var/run/docker.sock"]}
    

HTML Tags You Can Use on GitHub

Wherever HTML is rendered on GitHub (gists, README files in repos, comments on issues and pull requests, ...) you can use any of the HTML elements that GitHub Flavored Markdown (GFM) provides syntactic sugar for. You can either use the syntactic sugar that GFM (or other GitHub-supported markup language you're using) provides or, since Markdown can contain raw HTML, you can enter the HTML tags manually.

But GitHub also allows you to use a few HTML elements beyond what Markdown provides by entering the tags manually, and some of them are styled with CSS. Most raw HTML tags get stripped before rendering the HTML. Those tags that can be generated by GFM syntactic sugar, plus a few more, are whitelisted. These aren't documented anywhere that I can find. Here's what I've discovered so far:

<details> and <summary>

A `<detai