Skip to content

Instantly share code, notes, and snippets.

View xt0rted's full-sized avatar
πŸ›
Finding all the bugs

Brian Surowiec xt0rted

πŸ›
Finding all the bugs
View GitHub Profile
@xt0rted
xt0rted / Functions.cs
Last active January 23, 2019 09:30
.net core 2.0 webjob skeleton
namespace MyAwesomeProgram
{
using System.Threading.Tasks;
using Microsoft.Azure.WebJobs;
using Microsoft.Extensions.Logging;
[Disable("MYWEBJOB_DISABLED")]
public class Functions
{
@xt0rted
xt0rted / settings.reg
Last active May 4, 2018 22:40
Disable old versions of SSL and TLS on Windows
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols]
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 2.0]
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 2.0\Server]
"Enabled"=dword:00000000
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 3.0]
[core]
# this actually opens in Notepad2
editor = notepad.exe
[alias]
up = !git pull --rebase --prune $@ && git submodule update --init --recursive
bclean = "!f() { git branch --merged ${1-master} | grep -v " ${1-master}$" | xargs git branch -d; }; f"
bdone = "!f() { git checkout ${1-master} && git up && git bclean ${1-master}; }; f"
shove = push origin --force
tug = pull upstream master
@xt0rted
xt0rted / ApplicationInsightsDeployment.ps1
Created June 7, 2018 03:33
Application Insights & Raygun deplotments
# Sample usage .\CreateReleaseAnnotation.ps1 -applicationId "<appId>" -apiKey "<apiKey>" -releaseName "<releaseName>" -releaseProperties @{"ReleaseDescription"="Release with annotation";"TriggerBy"="John Doe"} -eventDateTime "2016-07-07T06:23:44"
param(
[parameter(Mandatory = $true)][string]$applicationId,
[parameter(Mandatory = $true)][string]$apiKey,
[parameter(Mandatory = $true)][string]$releaseName,
[parameter(Mandatory = $false)]$releaseProperties,
[parameter(Mandatory = $false)][DateTime]$eventDateTime
)
# background info on how fwlink works: After you submit a web request, many sites redirect through a series of intermediate pages before you finally land on the destination page.
@xt0rted
xt0rted / 2017.vsconfig
Last active October 19, 2022 18:12
Boxstarter script for setting up my dev environment
{
"version": "1.0",
"components": [
"Microsoft.VisualStudio.Component.CoreEditor",
"Microsoft.VisualStudio.Workload.CoreEditor",
"Microsoft.VisualStudio.Component.Roslyn.Compiler",
"Microsoft.Component.MSBuild",
"Microsoft.VisualStudio.Component.Static.Analysis.Tools",
"Microsoft.VisualStudio.Component.Roslyn.LanguageServices",
"Microsoft.VisualStudio.Component.PortableLibrary",
@xt0rted
xt0rted / README.md
Last active July 9, 2018 05:14
Create sentry releases

How to use

To use this when deploying from AppVeyor you'll need to make the following changes to your appveyor.yml.

environment:
  SENTRY_AUTHTOKEN:
    secure: ...
  SENTRY_ORGANIZATION: org-name
 SENTRY_PROJECT: project-name
@xt0rted
xt0rted / SentryTagHelper.cs
Created August 30, 2018 07:58
ASP.NET Core tag helper for Sentry
namespace Website.TagHelpers
{
using System.Security.Claims;
using System.Text;
using System.Text.Encodings.Web;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.AspNetCore.Mvc.ViewFeatures;
using Microsoft.AspNetCore.Razor.TagHelpers;
using Microsoft.Extensions.Options;
@xt0rted
xt0rted / setup.md
Created October 3, 2018 03:50
Setting up node in bash on WSL

Setting up node in bash on WSL

Setting up Node on WSL is easiest when done with NVM. To do this go into bash and run the following:

touch ~/.bashrc
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash

Once NVM is installed close and reopen bash, then run the following:

{
"version": "1.0",
"components": [
"Microsoft.VisualStudio.Workload.ManagedDesktop",
"Microsoft.VisualStudio.Workload.NativeDesktop",
"Microsoft.VisualStudio.Workload.NetWeb",
"Microsoft.VisualStudio.Workload.Azure",
"Microsoft.VisualStudio.Workload.VisualStudioExtension",
"microsoft.net.componentgroup.targetingpacks.common",
"microsoft.componentgroup.blend",