Skip to content

Instantly share code, notes, and snippets.

@potatoqualitee
potatoqualitee / retrowave.json
Last active July 24, 2020 12:47
retrowave theme for windows terminal
{
// this theme created and commented for powershell
// based off of 1984 unbolded vs code theme
"name" : "retrowave",
// entire background
"background" : "#070825",
// default text
"foreground" : "#46BDFF",
//quoted values
"cyan" : "#df81fc",
@dfinke
dfinke / Get-Government.ps1
Created December 26, 2016 14:28
PowerShell script to scrape US Government sites for members
function Get-Government {
param(
$name,
$state
)
$(
Get-USSenators | select @{n="name";e={$_.member_full}}, party, state, @{n="type";e={"Senate"}}
Get-USCongress | select @{n="name";e={$_.namelist}}, party, state, @{n="type";e={"House"}}
) |
function Get-ConfigurationDataAsObject
{
[CmdletBinding()]
Param (
[Parameter(Mandatory)]
[Microsoft.PowerShell.DesiredStateConfiguration.ArgumentToConfigurationDataTransformation()]
[hashtable] $ConfigurationData
)
return $ConfigurationData
}
@altrive
altrive / PowerShellv5_UsingNamespace.ps1
Last active November 12, 2019 16:11
PowerShell v5 'using namespace' syntax test
#Require -Version 5.0
# using statement must appear before any other statements in a script.
# other using types(Assembly/Command/Module/Type) is not supported yet?
# [Enum]::GetNames('System.Management.Automation.Language.UsingStatementKind')
using namespace System.Diagnostics
using namespace System.Linq
function Main
{
@atifaziz
atifaziz / VisualCron.ps1
Last active March 25, 2023 02:30
PowerShell scripts for VisualCron
# Copyright (c) 2014 Atif Aziz. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,