// https://hub.docker.com/_/microsoft-mssql-server
docker pull mcr.microsoft.com/mssql/server
docker images
docker run --name sqlserver -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=1q2w3e4r@#$" -p 1433:1433 -d mcr.microsoft.com/mssql/server
// WSL 2
docker run -v ~/docker --name sqlserver -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=1q2w3e4r@#$" -p 1433:1433 -d mcr.microsoft.com/mssql/server
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| builder.Services.AddControllers() | |
| .ConfigureApiBehaviorOptions(options => | |
| { | |
| options.SuppressModelStateInvalidFilter = true; | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static class DateTimeExtension | |
| { | |
| public static bool IsWeekend(this DateTime date) => date.DayOfWeek is DayOfWeek.Saturday or DayOfWeek.Sunday; | |
| public static bool IsHoliday(this DateTime date, IEnumerable<DateTime> holidays) => holidays.Any(x => x == date); | |
| public static DateTime Normalize(this DateTime date, IEnumerable<DateTime> holidays) | |
| { | |
| while (date.IsHoliday(holidays) || date.IsWeekend()) | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Security.Cryptography; | |
| using System.Text; | |
| using BenchmarkDotNet.Attributes; | |
| using BenchmarkDotNet.Running; | |
| namespace MyBenchmarks | |
| { | |
| public class StringBuilderVsArray | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| app.UseEndpoints(endpoints => | |
| { | |
| endpoints.MapGet("/", async context => | |
| { | |
| using var playwright = await Playwright.CreateAsync(); | |
| await using var browser = await playwright.Chromium.LaunchAsync(); | |
| var page = await browser.NewPageAsync(new ViewportSize {Width = 1200, Height = 600}); | |
| await page.GoToAsync("https://balta.io"); | |
| var file = await page.ScreenshotAsync(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import 'package:flutter/material.dart'; | |
| void main() { | |
| runApp(MyApp()); | |
| } | |
| class MyApp extends StatelessWidget { | |
| // This widget is the root of your application. | |
| @override | |
| Widget build(BuildContext context) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| using System.Text; | |
| namespace Balta.Models | |
| { | |
| public class Calendar | |
| { | |
| private const string Timezone = "America/Sao_Paulo"; | |
| private static string IcsDate(DateTime date, bool includeTimeZone = false) => $"{date:yyyyMMdd}T{date:HHmmss}{(includeTimeZone ? "Z" : "")}"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const { Octokit } = require("@octokit/rest"); | |
| const octokit = new Octokit({ | |
| auth: "", // Token para acesso ao GitHub - https://github.com/settings/tokens | |
| }); | |
| const username = 'andrebaltieri'; | |
| octokit.repos | |
| .listForUser({ | |
| username: username, | |
| type: "public", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import 'package:flutter/material.dart'; | |
| import 'package:provider/provider.dart'; | |
| import 'package:shopping/blocs/user.bloc.dart'; | |
| import 'package:shopping/models/authenticate-user.model.dart'; | |
| class LoginPage extends StatefulWidget { | |
| @override | |
| _LoginPageState createState() => _LoginPageState(); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Linq; | |
| namespace FibonacciTest | |
| { | |
| public class Program | |
| { | |
| public static void Main() | |
| { | |
| Console.WriteLine("Vai Renanzzinhhooooooo"); |