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 / build.yml
Created March 2, 2020 17:47
Building a .NET Core website with GitHub Actions
name: Build
on: pull_request
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout repo
@xt0rted
xt0rted / pull_request_comment.yml
Last active February 12, 2022 04:08
GitHub Actions workflow to run dotnet-format from pr comments
name: Format on Slash Command
on:
issue_comment:
types: created
env:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
jobs:
@xt0rted
xt0rted / github-hide-unpaid-alert.user.css
Last active April 18, 2019 19:45
Hides the unpaid alert that shows if an org you're in is having billing issues
/* ==UserStyle==
@name GitHub - hide unpaid bill alert
@namespace github.com/openstyles/stylus
@version 1.0.0
@description Hides the unpaid alert that shows if an org you're in is having billing issues
@author xt0rted
==/UserStyle== */
@-moz-document domain("github.com") {
body:not([class="page-responsive"]) > div > .flash-warn,
@xt0rted
xt0rted / github-dark-actions.user.css
Last active May 5, 2020 00:42
GitHub-Dark Actions
/* ==UserStyle==
@name GitHub Dark Actions
@namespace github.com/openstyles/stylus
@version 1.0.4
@author xt0rted
@updateURL https://gist.githubusercontent.com/xt0rted/9904350ee2b91fa311e5fee5d76e0012/raw/github-dark-actions.user.css
@advanced color base-color "Base color scheme" #4f8cc9
==/UserStyle== */
@-moz-document domain("github.com") {
/* ui when there are no workflows setup */
{
"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",
@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:

@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 / 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 / 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 / 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.