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 / README.md
Last active September 11, 2022 19:19
Local NuGet package source

Local NuGet package source

With these config settings you can create a .nuget folder in the root of your project and install packages without using a nuget server. This could be expanded on using newer features in NuGet v6 to map individual packages to a source to guaranteee you don't accidentally install one from a remote server.

.gitignore

# Using this as the starting point https://github.com/github/gitignore/blob/main/VisualStudio.gitignore

# Add this at the end
@xt0rted
xt0rted / Microsoft.PowerShell_profile.ps1
Created July 22, 2022 20:15
Shortcut to open the first .sln found in Visual Studio
function Open-VisualStudio {
Param(
[switch] $prerelease
)
$vswhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe"
if (!(Test-Path $vswhere)) {
Write-Host "vswhere must be installed to use this command" -ForegroundColor Red
return
@xt0rted
xt0rted / README.md
Last active November 12, 2024 16:32
Auto-merge Dependabot PRs for minor & patch updates

README

Note

I'm now using a newer version of this workflow that supports an allow list for individual packages and update groups which can be found here:

If you're using a workflow like this and need to manage secrets in multiple repos xt0rted/secrets-sync can simplify that. This lets you add secrets to one repo and sync them to many repos. There's also a template you can fork to get started quickly with it.

Personal Access Token

@xt0rted
xt0rted / README.md
Last active February 21, 2022 02:13
My oh my posh theme
@xt0rted
xt0rted / Code.cs
Last active September 18, 2023 20:27
C# port of Bitwarden's random password algorithm
void Main()
{
var options = new PasswordOptions
{
Length = 13,
MinLowercase = 2,
MinNumbers = 2,
MinSpecial = 1,
MinUppercase = 2,
UseLowercase = true,
@xt0rted
xt0rted / issue_comment.yml
Last active April 10, 2024 23:02
My GitHub Actions workflow with OctoDNS
name: Check comments for /commands
on:
issue_comment:
types: [created]
jobs:
deploy:
runs-on: ubuntu-latest
@xt0rted
xt0rted / issue_comment.yml
Last active May 9, 2021 07:18
GitHub Actions issue comment workflows
name: Check comments for /commands
on:
issue_comment:
types: [created]
jobs:
deploy:
runs-on: ubuntu-latest
@xt0rted
xt0rted / README.md
Last active May 8, 2021 19:07
Private NuGet feed with GitHub Actions

Private NuGet feed with GitHub Actions

GitHub Packages feeds always need to be authenticated. This means if your feed is public you still have to authenticate on your development machine and build server just like you would if it was a private feed.

Local

To setup the feed locally a Personal Access Token needs to be created with the repo and read:packages scopes. If you're going to be publishing packages with this token you'll also need the write:packages scope.

Keybase proof

I hereby claim:

  • I am xt0rted on github.
  • I am xt0rted (https://keybase.io/xt0rted) on keybase.
  • I have a public key ASBxbs2mEKfKg0bAu9qhcGUYs2Kx0FK4Lj-M2CyZJPG3fAo

To claim this, I am signing this object:

/* ==UserStyle==
@name GitHub - Hide viewed files
@namespace github.com/openstyles/stylus
@version 1.0.0
@description A new userstyle
@author Me
==/UserStyle== */
@-moz-document domain("github.com") {
.js-file[data-file-user-viewed]:not([data-file-user-viewed="false"]) {
display: none;