Skip to content

Instantly share code, notes, and snippets.

View salesHgabriel's full-sized avatar
💻
Code..

Gabriel Sales salesHgabriel

💻
Code..
View GitHub Profile
@salesHgabriel
salesHgabriel / funcao_criar_classe_csharp.sql
Created July 2, 2024 20:36
Postgresql sql to Class C#
DO $$
DECLARE
tableName text := 'car_atp';
result text := 'public class ' || tableName || ' {';
columnName text;
columnType text;
nullableSign text;
BEGIN
FOR columnName, columnType, nullableSign IN
SELECT
@salesHgabriel
salesHgabriel / Enviar email hotmail
Last active October 11, 2024 13:32
Send Mail with Outlook and C#
using System.Net.Mail;
Console.WriteLine("--------- PLAYGROUND ----------");
SendEmail();
static void SendEmail()
{
string to = "[email protected]";
string from = "[email protected]";
@salesHgabriel
salesHgabriel / md
Created October 12, 2023 23:00
Signarl with Postman
connect
{"protocol":"json","version":1}
Methods
{"arguments":["TestGroup"],"invocationId":"0","target":"JoinGroup","type":1}
@salesHgabriel
salesHgabriel / gist:25e8cb104cf1ccd32eb4deee324d103a
Created March 1, 2023 19:40 — forked from osya/gist:251ee7c5d1e696d5f2aa
Using the NetTopologySuite (NTS) to read and write Shapefiles in C# #CSharp
using GisSharpBlog.NetTopologySuite.Features;
using GisSharpBlog.NetTopologySuite.Geometries;
using GisSharpBlog.NetTopologySuite.IO;
using GeoAPI.Geometries;
...etc....
@salesHgabriel
salesHgabriel / WhereIf.cs
Created February 8, 2023 17:42
Where if extension linq method C#
public static class Where
{
private static string nomeMetodoWhere = "where";
public static IQueryable<TSource> WhereIf<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, int, bool>> predicate, bool condicao)
{
if (source == null)
throw new Exception("source");
@salesHgabriel
salesHgabriel / aliases.md
Last active September 25, 2024 18:11
Aliases git

git config --global alias.wip '!git add . && git commit -m "WIP"'

git config --global alias.df diff

git config --global alias.rs restore

git config --global alias.co checkout

git config --global alias.br branch