Skip to content

Instantly share code, notes, and snippets.

dotnet run -c Release
using System.Collections.Generic;
using BenchmarkDotNet.Attributes; // Library for benchmarking
using BenchmarkDotNet.Running; // Library for running benchmarks
using Newtonsoft.Json; // Library for JSON serialization
namespace JsonBenchmark
{
public class Product
{
public int Id { get; set; }
@wendreof
wendreof / aws-commands.txt
Created August 19, 2023 04:30
aws-commands learning
#!/bin/bash
yum update -y
yum install httpd -y
systemctl start httpd
systemctl enable httpd
----------------------------------
rpm -qa | grep httpd
-----------------------
sudo fdisk -l
<Target Name="MyCustomTask" BeforeTargets="CoreBuild">
<Exec Command="$(PowerShellExe) dotnet tool update -g dotnet-format " />
<Exec Command="$(PowerShellExe) git config --local core.hooksPath .\.git-hooks\" />
</Target>
@wendreof
wendreof / pre-commit
Last active June 18, 2022 20:18
.Net Hooks
#!/bin/sh
echo "Formattng the .cs files changed... ✨✨✨"
# Valida HoosPath
git config core.hooks
# Format the code
FILES=$(git diff --cached --name-only --diff-filter=ACM "*.cs")
if [ -n "$FILES" ]
@wendreof
wendreof / script.sh
Created December 4, 2021 12:27
Creating new GitHub Tag
# Create the new tag
git tag -a v1.0.2 -m "v1.0.2 version"
# Push the new tag
git push origin v1.0.2
@wendreof
wendreof / script.yaml
Created December 4, 2021 12:10
Updating Code Version
name: Updating_Code_Version
# This action will be triggered on every new tag
# For this example I'm using a tag named v1.0.2
on:
push:
tags:
- "*"
env:
@wendreof
wendreof / commands.yaml
Created December 4, 2021 11:33
Activating Cider
# STEP 1 - Add this line below dev_dependencies on your pubspec.yaml file
# for the ones using null safety
dev_dependencies:
cider: ^0.1.0
# for the ones not using null safety
dev_dependencies:
cider: ^0.0.5
@wendreof
wendreof / deploy.yaml
Created October 16, 2021 05:41
publish_ghPages
name: deploy
on: #trigger on push & PR to this branch only
push:
branches:
- master
pull_request:
branches:
- master
@wendreof
wendreof / Content-Security-Policy.html
Created October 16, 2021 05:03
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">