Skip to content

Instantly share code, notes, and snippets.

Working from home

Rafael dos Santos rsantosdev

Working from home
View GitHub Profile
View docker-compose-sql-healthcheck
version: '3.4'
container_name: dev_sql
- SA_PASSWORD=yourStrong(!)Password
rsantosdev / ImageConverter.cs
Created Jan 5, 2019
Reference conversion options for my online course
View ImageConverter.cs
public class ImageConverter
byte[] ConvertToPng(byte[] source, ConversionOptions options) => Execute(source,
$"- -filter Triangle -define filter:support=2 -resize {options.Width}x{options.Height}> -density 150x150 -unsharp 0.25x0.25+8+0.065 -dither None -posterize 136 -define png:compression-filter=5 -define png:compression-level=9 -define png:compression-strategy=1 -define png:exclude-chunk=all -interlace none -colorspace sRGB -strip png:-");
byte[] ConvertToJpg(byte[] source, ConversionOptions options) => Execute(source,
$"- -filter Triangle -define filter:support=2 -resize {options.Width}x{options.Height}> -unsharp 0.25x0.25+8+0.065 -dither None -posterize 136 -quality {options.Quality} -define jpeg:fancy-upsampling=off -interlace none -colorspace sRGB -background white -alpha remove -strip jpg:-");
rsantosdev / WebHost.cs
Created May 15, 2018
a copy of webhost file from core metapackage
View WebHost.cs
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.IO;
using System.Reflection;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.HostFiltering;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
rsantosdev / rethinkdb-slow.js
Created Apr 15, 2016
Monitor or trace slow queries on rethinkdb cluster.
View rethinkdb-slow.js
return j('type').eq('query')