Skip to content

Instantly share code, notes, and snippets.

View ssippe's full-sized avatar

Sam Sippe ssippe

  • Gold Coast, Australia
  • 16:49 (UTC +10:00)
View GitHub Profile
@ssippe
ssippe / Dumper.cs
Last active March 28, 2026 22:45
Revit BuiltInParameter Dumper
public static class Dumper
{
static IReadOnlyList<string> GetValues(BuiltInParameter builtInParameter, Document doc)
{
var values = new List<string>();
var i = 0;
var targetType = FamilyUtil2.GetElementsElementType<ElementType>(doc)
.FirstOrDefault(dt => dt.get_Parameter(builtInParameter)?.StorageType == StorageType.Integer);
if (targetType == null)
@ssippe
ssippe / BuiltInParameter.csv
Last active March 28, 2026 22:23
Revit 2023.1 BuiltInParameter Int Values. Created 2026-03-29. Revit 2023.1 Application.VersionBuild 23.1.80.30 Application.VersionName Autodesk Revit 2023 Application.VersionNumber 2023
BuiltInParameter BuiltInParameterInt Value AsValueString
STAIRS_TRISERTYPE_RISER_IS_SLANTED -1152177 0 No
STAIRS_TRISERTYPE_RISER_IS_SLANTED -1152177 1 Yes
STAIRS_TRISERTYPE_RISER -1152176 0 No
STAIRS_TRISERTYPE_RISER -1152176 1 Yes
STAIRS_TRISERTYPE_NOSING_PLACEMENT -1152175 0 Front Only
STAIRS_TRISERTYPE_NOSING_PLACEMENT -1152175 1 Front and Left
STAIRS_TRISERTYPE_NOSING_PLACEMENT -1152175 2 Front and Right
STAIRS_TRISERTYPE_NOSING_PLACEMENT -1152175 3 Front, Left and Right
STAIRS_TRISERTYPE_RISER_TREAD_CONNECTION -1152161 0 Extend Riser Behind Tread
@ssippe
ssippe / CreateDashboard.cs
Created March 21, 2024 02:05
Create a dashboard per asg that beats the 3hr aws CloudWatch Metrics Insights limit
using Amazon.AutoScaling.Model;
using Amazon.AutoScaling;
using Amazon.CloudWatch.Model;
using Amazon;
using Amazon.CloudWatch;
const string Namespace = "CWAgent";
const string MetricName = "TCPv4 Connections Established";
@ssippe
ssippe / aws-env-var.ps1
Last active March 21, 2023 02:19
aws-env-var.ps1
aws --profile r1-dev sso login; aws --profile r1-dev configure export-credentials --format powershell | iex; devenv
using System.Linq;
using System.Data.Entity.Infrastructure;
using System;
namespace Reckon.Data.EF
{
public static class DbChangeTrackerExtension
{
/// <summary>
/// Get a summary of Tracked Changes on a DbContext.ChangeTracker
parse @message "* * * * * * * * * * * * * * *" as
date, time, s_ip, cs_method, cs_uri_stem, cs_uri_query, s_port, cs_username, c_ip, cs_User_Agent, cs_Referer, sc_status, sc_substatus, sc_win32_status, time_taken
| display @timestamp,cs_method, cs_uri_stem, time_taken
| filter time_taken > 1000
| sort @timestamp desc
| limit 20
@ssippe
ssippe / wslNotes.md
Last active June 22, 2021 06:08
wsl notes
namespace cs9test
{
// @jbogard "it looks like the "immutable-by-default" behavior of C# 9 records is really only with the compact positional syntax, not with just the "record" keyword"
// https://twitter.com/jbogard/status/1321120266676850688
/// <summary>
/// immutable with compact positional syntax
/// </summary>
public record Person(string FirstName, string LastName);
@ssippe
ssippe / listGen.cs
Created September 14, 2020 23:53
List generation with optional members and immutable variables
static IReadOnlyList<int> GenerateList(int option)
{
IEnumerable<int> F()
{
if (option > 0)
yield return 1;
if (option > 1)
yield return 2;
if (option > 3)
yield return 3;
steps:
- task: DotNetCoreCLI@2
inputs:
command: 'custom'
custom: 'tool'
arguments: 'update dotnet-script -g'
displayName: 'install dotnet-script'
- task: CmdLine@2
inputs: