Skip to content

Instantly share code, notes, and snippets.

View leandromonaco's full-sized avatar
💭
"Live in the future, then build what's missing"

Leo leandromonaco

💭
"Live in the future, then build what's missing"
View GitHub Profile
[
{
"Id": 1,
"Name": "Afghanistan",
"PublicHolidayCalendarId": "en.af"
},
{
"Id": 2,
"Name": "Albania",
"PublicHolidayCalendarId": "en.al"
#This script is based on https://chris-ayers.com/2021/08/01/scripting-winget/
#Test ISO: https://www.microsoft.com/en-us/evalcenter/evaluate-windows-11-enterprise
#https://www.virtualbox.org/
#Install WinGet
#Based on this gist: https://gist.github.com/crutkas/6c2096eae387e544bd05cde246f23901
$hasPackageManager = Get-AppPackage -name 'Microsoft.DesktopAppInstaller'
if (!$hasPackageManager -or [version]$hasPackageManager.Version -lt [version]"1.10.0.0") {
"Installing winget Dependencies"
Add-AppxPackage -Path 'https://aka.ms/Microsoft.VCLibs.x64.14.00.Desktop.appx'
@leandromonaco
leandromonaco / 2019-https-localhost.md
Created April 21, 2023 03:57 — forked from cecilemuller/2019-https-localhost.md
How to create an HTTPS certificate for localhost domains

How to create an HTTPS certificate for localhost domains

This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.

Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).

Get-Process -Id (Get-NetTCPConnection -LocalPort 10000).OwningProcess
class ExternalEntity
{
public int Id { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
}
octo.exe pack --id=AppName --version=3.0.2.9469 --outFolder=[output folder] --basePath=[base folder]
octo.exe push --package=[nuget package location] --server=https://OctopusServer.com --apiKey=[key] --space=Spaces-1
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath=".\MyNetCoreAppHosting.exe" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" />
</system.webServer>
</configuration>
DECLARE @json NVARCHAR(MAX)
SELECT @json=[Content]
FROM [company].[Snapshot]
SELECT JSON_VALUE(value, '$.Team') AS Team,
(JSON_VALUE(value, '$.Feature.Id') + ' ' + JSON_VALUE(value, '$.Feature.Title')) AS Feature,
JSON_VALUE(value, '$.SprintId') AS Sprint,
CASE
WHEN JSON_VALUE(value, '$.Status')='0' THEN 'Refinement'
version: '3'
services:
redis:
image: redis:5.0.9
ports:
- 6999:6379
volumes:
- ./redis.conf:/redis.conf
command: [ "redis-server", "/redis.conf" ]
$version = '$(Build.SourceBranchName)'
$isRelease = $version -match "^[\d\.]+$"
if($version -ne 'master' -and $isRelease -eq $false)
{
echo '##vso[task.setvariable variable=AppVersion;]feature'
}
Write-Output $(AppVersion)