Skip to content

Instantly share code, notes, and snippets.

Avatar

Jānis Veinbergs janis-veinbergs

View GitHub Profile
@janis-veinbergs
janis-veinbergs / Out-Tree.ps1
Last active December 6, 2022 07:41
PowerShell Out-Tree: View object parent/child relationship within a hierarchy
View Out-Tree.ps1
Set-StrictMode -Version 3.0
function Out-Tree {
<#
.SYNOPSIS
View object parent/child relationship within a hierarchy
.DESCRIPTION
Outputs objects as a hierarchy, outputted as string. It is important that properties are sorted.
It is very important to sort list before Out-Tree cmdlet by ParentValueProperty. Because if objects come in NOT within sequence, the hierarchy will be "interrupted" and restart
@janis-veinbergs
janis-veinbergs / Slick.d.ts
Created February 21, 2022 10:33
Generated from SparkleXrm project using Rosetta.ScriptSharp.Definition.BuildTask
View Slick.d.ts
/**
* File: Cell.cs
*/
declare module Slick {
export class CellSelection {
public row : number;
public cell : number;
public grid : Slick.Grid;
}
}
@janis-veinbergs
janis-veinbergs / ssis_script_object_output.cs
Last active December 4, 2019 10:49
Use Script Task to output data within object variable as rows. You still have to define output columns.
View ssis_script_object_output.cs
using Microsoft.SqlServer.Dts.Pipeline;
using Microsoft.SqlServer.Dts.Runtime.Wrapper;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.OleDb;
using System.Reflection;
using System.Text;
//Not using any syntax after .net 4.5 as won't be debuggable until 3.2 Preview https://marketplace.visualstudio.com/items?itemName=SSIS.SqlServerIntegrationServicesProjects