Skip to content

Instantly share code, notes, and snippets.

View dfinke's full-sized avatar

Doug Finke dfinke

View GitHub Profile
@jhoneill
jhoneill / PowerShellNotebookModule.ipynb
Last active November 23, 2020 18:06
Changes I made to the module
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@SQLvariant
SQLvariant / Split_SQL_Files.ps1
Last active July 28, 2020 18:02
Simple PowerShell script to break apart comment blocks from code blocks, of a .SQL file
$Path = 'c:\temp\sys_databases.sql'
$s = Get-Content -Raw ( Resolve-Path $Path )
#$s.GetType()
<# Doug's code for extracting the comment blocks. #>
$locations=@()
$pos=$s.IndexOf("/*")
while ($pos -ge 0) {
function Format-Table {
param([parameter(valuefrompipeline=$true)]$inputObject)
begin {
$objects = [System.Collections.Generic.List[PSObject]]::new()
}
process {
$objects += $inputObject
}
@joeduffy
joeduffy / Pulumi.yaml
Last active October 20, 2019 22:35
A serverless website with dynamic hit counter on Azure
name: page-counter-az
runtime: nodejs
description: A page counter on Azure
@SQLvariant
SQLvariant / ExportPBIServiceAssets-toCSV.PS1
Created September 20, 2019 15:40
Export information about Power BI tenant assets to Excel or CSV files
<##################################################################################################>
<#
Export information about assets in the Power BI Tenant to individual CSV files.
#>
<##################################################################################################>
<#
NOTE: You have to be a Power BI Admin to use the -Scope Organization parameter option. #>
<# First, get all the capacities for the tenant, if they have any #>
Get-PowerBICapacity -Scope Organization |
@sunnyc7
sunnyc7 / ReadingAndOtherConsumption.md
Last active February 7, 2019 01:55
Current List of Consummables.

Reading, Video and Audio List

Software

  • Ousterhout, John - A Philosophy of Software Design. Amazon
  • Zinsser, William - On Writing Well: The Classic Guide to Writing Nonfiction On Writing Well Amazon
  • Stephen Orban - Ahead in the Cloud: Best Practices for Navigating the Future of Enterprise IT (Kindle Books) Amazon

Management

  • Grove, Andy. High Output Management. Amazon
  • Forsgren PhD, Nicole, Humble, Jez, Kim, Gene - Accelerate: The Science of Lean Software and DevOps: Building and Scaling High Performing Technology Organizations [Amazon](https://www.amazon.com/Accelerate-Softw
// LogAnalytics function to query a performance counter (CounterName), in computer, starting on date Sart for a 30d period
// Copy paste the query in LogAnalytics window
// Define custom Loganalytics function
let PerfCountWithin30dRange = (start:date, CounterName:string, CompName:string) {
let period = 30d;
Perf
| where (TimeGenerated > start and TimeGenerated < start + period)
| where (Computer contains CompName)
@TylerLeonhardt
TylerLeonhardt / TweetScript.psm1
Last active July 17, 2018 19:37
Importing Scripts from Tweets! #280characters
# Importing Scripts directly from Tweets! #280characters
#
# NOTE: This should not be used for any production environment. Or any environment for that matter. Use https://PowerShellGallery.com
#
#
####################################
# Example #
####################################
#
#
@jbirley
jbirley / Get-Percentile.ps1
Last active March 5, 2024 14:16
A percentile function for PowerShell
# MIT License
# Copyright (c) 2022 Jim Birley
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
@adamdriscoll
adamdriscoll / task.json
Created May 15, 2017 11:32
VSCode task.json to add a build command to package a PowerShell script as an exe
{
"version": "0.1.0",
"tasks": [
{
"taskName": "build",
"command": "powershell",
"args": ["Merge-Script -Script '${file}' -Bundle -OutputPath '${fileDirname}\\out' -OutputType Executable"],
"isBuildCommand": true,
"showOutput": "silent"
}