Skip to content

Instantly share code, notes, and snippets.

View bundyfx's full-sized avatar

Flynn Bundy bundyfx

View GitHub Profile
import requests
import re
import pandas as pd
import csv
from random import choice
from bs4 import BeautifulSoup
from datetime import datetime
from time import mktime
<#
.Synopsis
Return basic details on AD objects
.EXAMPLE
Get-ADObjectInfo -Computers
.EXAMPLE
Get-ADObjectInfo -Users | Format-Table -Autosize
.EXAMPLE
Get-ADObjectInfo -Users | Export-Csv -Path C:\Users.csv -nti
#>
Measure-Command { Write-Output (((Select-String -Path (Get-ChildItem C:\FoxDeploy -Recurse -Filter *.pgn) -Pattern '^\[Result\s"\d.*' -AllMatches).Matches.Value ) | Group-Object -NoElement | Format-Table -AutoSize) }
break
#0o0o0o0o0 git content
$ContentPaths = 'C:\Lab\Git\Prod','C:\Lab\Git\Test','C:\Lab\Git\Dev'
git clone https://github.com/bundyfx/Example-Web.git $ContentPaths[0] --quiet
git clone https://github.com/bundyfx/Web-Example-Test.git $ContentPaths[1] --quiet
git clone https://github.com/bundyfx/Web-Example-Dev.git $ContentPaths[2] --quiet
ii C:\Lab\Git
#Starting Section
$reader=(New-Object System.Xml.XmlNodeReader $xaml)
$Window=[Windows.Markup.XamlReader]::Load($reader)
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:WpfApplication3"
Title="DSC Control Center" Height="491.015" Width="1102.416" ResizeMode="NoResize">
<Grid>
<TextBox Name="Computer" HorizontalAlignment="Left" Height="23" Margin="81,9,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="170"/>
<Label Name="label" Content="Computer:" HorizontalAlignment="Left" Margin="10,6,0,0" VerticalAlignment="Top" Width="66"/>
@bundyfx
bundyfx / Jan2016-ScriptingGames
Last active January 3, 2016 10:05
Jan 2016 Scripting Games
<#
.Synopsis
Get the Up time (Last boot time) of target machines.
.EXAMPLE
Get-Uptime -Computername DC1,NLB1,NLB2
.EXAMPLE
$Collection | Gup
.EXAMPLE
$Collection | Get-Uptime | Export-CSV C:\Temp\UpTime.csv -nti
.EXAMPLE
@bundyfx
bundyfx / DecemberScriptingGames.ps1
Created December 9, 2015 00:58
December Scripting Games Puzzle !!
$list = @"
1 Partridge in a pear tree
2 Turtle Doves
3 French Hens
4 Calling Birds
5 Golden Rings
6 Geese a laying
7 Swans a swimming
8 Maids a milking
9 Ladies dancing
param([string]$VMNameStr)
0..(($VMNameStr -split ",").GetLength(0) -1) | % {Set-Variable "VMName$Psitem" -Value ($VMNameStr -split ',')[$Psitem] -PassThru }
#The VMNameStr param is intended to be taken as a single string rather than the conventional array of strings ([String[]]).
#Take values from param, split those and turn it in a range, Foreach of those create a new variable based on the number coming across the pipeline.
#The value of those variables will be the original array split calling the position index of the current item in the pipeline (Passthru to display this on the screen).
@bundyfx
bundyfx / NBA_RSS_October_2015
Created October 11, 2015 10:03
October 2015 Scripting Games (NBA RSS)
#Requires -Version 3.0
<#
.Synopsis
Get the latest updates on your favourite NBA teams!
.EXAMPLE
Get-RSSFeed -Team Lakers
.EXAMPLE
Get-RSSFeed Spurs
.NOTES
Why not combine two of my favourite things! PowerShell/NBA