Skip to content

Instantly share code, notes, and snippets.

View litodam's full-sized avatar

Pablo "Lito" Damiani litodam

  • SOUTHWORKS
  • Buenos Aires, Argentina
  • X @litodam
View GitHub Profile
@litodam
litodam / Create-SelfSignedCert.ps1
Created November 15, 2016 18:27 — forked from sjwaight/Create-SelfSignedCert.ps1
Shows how we can generate a self-signed certificate for use with an Azure AD Service Principal
# Requires PowerShell to be run as Admin-level user.
New-SelfSignedCertificate -CertStoreLocation cert:\localmachine\my -Provider "Microsoft Enhanced RSA and AES Cryptographic Provider" `
-Subject "cn=mydemokvcert" -KeyDescription "Used to access Key Vault" `
-NotBefore (Get-Date).AddDays(-1) -NotAfter (Get-Date).AddYears(2)
# PSParentPath: Microsoft.PowerShell.Security\Certificate::LocalMachine\my
#
#Thumbprint Subject
#---------- -------
##
# Create new Service Principal with Cert configured
##
Login-AzureRmAccount -SubscriptionId XXXXXXXX-XXXX-XXXX-XXXX-86b9ebca2d13
# $credValue comes from the previous script and contains the X509 cert we wish to use.
# $validFrom comes from the previous script and is the validity start date for the cert.
# $validTo comes from the previous script and is the validity end data for the cert.
@litodam
litodam / New-SelfSignedCertificate.ps1
Last active June 8, 2017 03:02
Create Self-signed certificate for IIS (with Subject Alternative Name)
# Requires PowerShell to be run as Admin.
New-SelfSignedCertificate -CertStoreLocation cert:\localmachine\my -Provider "Microsoft Enhanced RSA and AES Cryptographic Provider" -Subject "cn=lito.com" -DnsName "lito.com" -KeyDescription "lito.com" -NotBefore (Get-Date).AddDays(-1) -NotAfter (Get-Date).AddYears(2) -FriendlyName "Self Signed Cert for lito.com"
# After creating it open the Certificate Store and copy the cert under Trusted Root Certificate Authorities
@litodam
litodam / Settings.StyleCop
Created July 19, 2017 15:11
Default stylecop settings
<StyleCopSettings Version="105">
<Parsers>
<Parser ParserId="StyleCop.CSharp.CsParser">
<ParserSettings>
<BooleanProperty Name="AnalyzeDesignerFiles">False</BooleanProperty>
</ParserSettings>
</Parser>
</Parsers>
<Analyzers>
<Analyzer AnalyzerId="StyleCop.CSharp.DocumentationRules">
@litodam
litodam / InMemoryCacheHelper.cs
Last active August 2, 2017 19:32
MemoryCacheHelper<T>
using System;
using System.Runtime.Caching;
using System.Threading.Tasks;
namespace Helpers
{
public static class MemoryCacheHelper
{
public const int DefaultMinutesToCache = 60;
@litodam
litodam / jira-velocity-planning.js
Created December 14, 2019 02:29
Velocity Planning for Jira Scrum Boards - Tampermonkey script
// ==UserScript==
// @name Velocity Planning for Jira Scrum Boards
// @namespace http://tampermonkey.net/
// @version 0.1.15
// @description Velocity Planning for Jira Scrum Sprints Boards
// @author litodam
// @match https://*.atlassian.net/secure/RapidBoard.jspa*
// @grant none
// ==/UserScript==