Skip to content

Instantly share code, notes, and snippets.

@hervala
hervala / Password.cs
Last active March 10, 2021 19:54
c# password generator
using System;
using System.Linq;
using System.Security.Cryptography;
namespace PasswordGenerator
{
public static class Password
{
private static RNGCryptoServiceProvider rngCsp = new();
private static string lowercaseCharacters = "abcdefghijklmnopqrstuvwxyz";
@hervala
hervala / vscode_extensions.bat
Created November 7, 2019 10:34
Visual Studio Code extensions
code --install-extension alefragnani.project-manager
code --install-extension bbenoist.vagrant
code --install-extension bpruitt-goddard.mermaid-markdown-syntax-highlighting
code --install-extension bungcip.better-toml
code --install-extension cake-build.cake-vscode
code --install-extension donjayamanne.githistory
code --install-extension DotJoshJohnson.xml
code --install-extension eamodio.gitlens
code --install-extension EditorConfig.EditorConfig
code --install-extension formulahendry.docker-explorer
@hervala
hervala / mfalogin.sh
Created September 6, 2019 07:42
mfa token script for aws. Run with $ source ./mfalogin.sh
#!/bin/bash
# unset to make sure no old values mess up the get-session-token query
unset AWS_ACCESS_KEY_ID
unset AWS_SECRET_ACCESS_KEY
unset AWS_SESSION_TOKEN
# Run this script with source because this script sets environment variables
# Make sure the users aws credentials are set for aws cli
@hervala
hervala / StyleCop.Analyzers.1.0.2.rules.template.xml
Created October 16, 2018 13:56
StyleCop Analyzer 1.0.2 rule template for SonerQube plugin
<?xml version="1.0" encoding="utf-8"?>
<rules xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<rule>
<key>SA0000</key>
<name>Workaround incomplete diagnostics in Visual Studio 2015 Update 1</name>
<internalKey>SA0000</internalKey>
<description><![CDATA[<p>Visual Studio 2015 Update 1 contains a bug which can cause diagnostics to occasionally not display in the Errors window. When this occurs, it is impossible to use the code fixes to address style violations reported during a build. This analyzer works around the bug (dotnet/roslyn#7446).
When this analyzer is enabled, all diagnostics will eventually be reported in the Error window, but the performance of the analyzers is reduced. The rule is disabled for maximum performance, but can be enabled if users notice errors appearing during a build but not while editing, and they wish to use the code fixes to correct them.

Keybase proof

I hereby claim:

  • I am hervala on github.
  • I am krbnsk (https://keybase.io/krbnsk) on keybase.
  • I have a public key ASCjB5M2lpsp7NiWeuD6WwDYnoXkEHmEcJdo4BFZpgOCYwo

To claim this, I am signing this object:

@hervala
hervala / boxstarter.ps1
Last active February 2, 2024 14:16 — forked from jessfraz/boxstarter.ps1
Boxstarter Commands for a new Windows box.
# Description: Boxstarter Script
# Author: Jess Frazelle <jess@linux.com>
# Last Updated: 2017-09-11
#
# Install boxstarter:
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
#
# You might need to set: Set-ExecutionPolicy RemoteSigned
#
# Run this boxstarter by calling the following from an **elevated** command-prompt:
# Password for the SA user (required)
MSSQL_SA_PASSWORD='Pass!W0rd'
# Product ID of the version of SQL server you're installing
# Must be evaluation, developer, express, web, standard, enterprise, or your 25 digit product key
# Defaults to developer
MSSQL_PID='developer'
# Install SQL Server Agent (recommended)
SQL_INSTALL_AGENT='y'