This file contains 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
# Welcome to the Starter Pipeline for GitHub Advanced Security for Azure DevOps (GHAzDo) | |
# | |
# This pipeline enables two core features of GHAzDo for your repository: | |
# | |
# - Dependency Scanning, which will examine your application's package manifests | |
# to find and alert on any vulnerable dependencies you may be using, and | |
# | |
# - Code Scanning, which performs static analysis (SAST) of your application's source | |
# code to identify certain types of security vulnerabilities, along with additional, | |
# optional quality checks. |
This file contains 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
#! /usr/bin/env bash | |
# ***DISCLAIMER: Only tested on MacOS & Linux*** | |
# Author: Dave Lacy (@davelacy) | |
# Created: 2022-05-17 | |
# Updated: 2022-05-19 | |
# Purpose: To provide a best guess estimate of the number of unique committers for GHAS pricing estimates. For organizations currently using 3rd party git version control products like ADO, GitLab, BitBucket, etc. | |
# Before use, make sure you: |
This file contains 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
$symbols = '!@#$%^&*'.ToCharArray() | |
$characterList = 'a'..'z' + 'A'..'Z' + '0'..'9' + $symbols | |
function GeneratePassword { | |
param( | |
[Parameter(Mandatory = $false)] | |
[ValidateRange(12, 256)] | |
[int] | |
$length = 14 | |
) | |
This file contains 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.Diagnostics; | |
using System.Linq; | |
using System.Threading.Tasks; | |
using Microsoft.AspNetCore.Mvc; | |
using System.IdentityModel.Tokens.Jwt; | |
using Microsoft.IdentityModel.Tokens; | |
using Microsoft.AspNetCore.Hosting; | |
using Microsoft.Extensions.Options; |
This file contains 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
# Requirements: pip install tweepy fuzzywuzzy python-Levenshtein | |
import tweepy | |
import re | |
from fuzzywuzzy import fuzz | |
# Credentials go here (generate at: https://apps.twitter.com) | |
auth = tweepy.OAuthHandler('consumer_key', 'consumer_secret') | |
auth.set_access_token('access_token', 'access_token_secret') | |
# Connect to Twitter |
This file contains 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
/// <summary> | |
/// Fix of JsonMediaTypeFormatter that does not convert JSON to object when Request is in Chunked Transfer Encoding. | |
/// </summary> | |
public class XJsonMediaTypeFormatter : JsonMediaTypeFormatter | |
{ | |
/// <summary> | |
/// Replaces web api default JsonMediaTypeFormatter with this instance. | |
/// Usage: | |
/// protected void Application_Start() | |
/// { |
This file contains 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
// | |
// Regular Expression for URL validation | |
// | |
// Author: Diego Perini | |
// Created: 2010/12/05 | |
// Updated: 2018/09/12 | |
// License: MIT | |
// | |
// Copyright (c) 2010-2018 Diego Perini (http://www.iport.it) | |
// |