Skip to content

Instantly share code, notes, and snippets.

View felickz's full-sized avatar
:octocat:
ALL YOUR REBASE ARE BELONG TO US.

Chad Bentz felickz

:octocat:
ALL YOUR REBASE ARE BELONG TO US.
View GitHub Profile
@chtzvt
chtzvt / ghazdo-starter.yml
Last active March 7, 2024 17:57
Starter Pipeline for GitHub Advanced Security for Azure DevOps
# 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.
@davelacy
davelacy / unique-committers.sh
Last active October 20, 2022 19:07
Unique active committer count for non-GitHub customers
#! /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:
$symbols = '!@#$%^&*'.ToCharArray()
$characterList = 'a'..'z' + 'A'..'Z' + '0'..'9' + $symbols
function GeneratePassword {
param(
[Parameter(Mandatory = $false)]
[ValidateRange(12, 256)]
[int]
$length = 14
)
@rbrayb
rbrayb / HomeController.cs
Created July 17, 2019 04:13
Using a JWT to invoke an Azure AD B2C flow using id_token_hint
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;
@ummjackson
ummjackson / killabot.py
Created May 4, 2018 08:05
killabot v1 (wip)
# 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
@cobysy
cobysy / XJsonMediaTypeFormatter.cs
Last active September 11, 2020 13:31
Fix of JsonMediaTypeFormatter (ASP.net WebAPI) that does not convert JSON to object when Request is in Chunked Transfer Encoding.
/// <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()
/// {
//
// 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)
//