Skip to content

Instantly share code, notes, and snippets.

Avatar

Paul Farry PaulFarry

  • Brisbane, Queensland, Australia
View GitHub Profile
@PaulFarry
PaulFarry / sample.cs
Created Jun 22, 2020
Dump Environment Variables
View sample.cs
var environmentVariables = Environment.GetEnvironmentVariables();
foreach (DictionaryEntry variable in environmentVariables)
{
log.LogInformation("Variable {key} Value {value}", variable.Key, variable.Value);
}
@PaulFarry
PaulFarry / solutionlist.vb
Created Feb 22, 2012
Visual Studio Solutions and Project Items (add to sample macros)
View solutionlist.vb
Sub ListProjects()
Dim window As Window
Dim proj As Project
Dim s As Solution
Dim rule As String = New String("="c, 20) & Microsoft.VisualBasic.Constants.vbCrLf
window = DTE.Windows.Item(Constants.vsWindowKindCommandWindow)
Dim target As Object
If (DTE.ActiveWindow Is window) Then
target = window.Object
Else
@PaulFarry
PaulFarry / Ascii85.vb
Created Feb 9, 2012
ASCII85 / Base85 Encoder/Decoder for VB.NET
View Ascii85.vb
Imports System
Imports System.Text
Imports System.IO
''' <summary>
''' VB.Net implementation of ASCII85 encoding.
''' Based on C code from http://www.stillhq.com/cgi-bin/cvsweb/ascii85/
''' based on C# Jeff Atwood http://www.codinghorror.com/blog/archives/000410.html
''' </summary>
''' <remarks></remarks>
Public Class Ascii85