Skip to content

Instantly share code, notes, and snippets.

View 1RedOne's full-sized avatar

Stephen Owen 1RedOne

View GitHub Profile
@1RedOne
1RedOne / Lesson.md
Last active May 25, 2018 02:41
052718 - Church

Sunday, May 27, 2018

TEACHING KIDS ABOUT WORSHIP

WHAT IS WORSHIP?

Sometimes we think that worship is just singing songs to God. Sometimes we think it’s honoring God with our tithes or serving at our church. But it’s not just those things. Worship is much more than that.

I like a definition from the 1828 Webster’s Dictionary,

@1RedOne
1RedOne / Get-AVDefinitionPayload.ps1
Last active March 20, 2018 14:30
Grab today, or yesterday's AV Definitions
$u = 'ftp://ftp.symantec.com/public/english_us_canada/antivirus_definitions/norton_antivirus/'
function Get-FtpDir ($url,$credentials) {
$request = [Net.WebRequest]::Create($url)
$request.Method = [System.Net.WebRequestMethods+FTP]::ListDirectory
if ($credentials) { $request.Credentials = $credentials }
$response = $request.GetResponse()
$reader = New-Object IO.StreamReader $response.GetResponseStream()
while(-not $reader.EndOfStream) {
[pscustomobject]@{FileName=$reader.ReadLine()}
@1RedOne
1RedOne / README.md
Created March 5, 2018 21:50
User Voice request

In our organization, we really like what we've seen for the Scripts Approval Workflow, where we are able to select 'Approvers' to authorize changes to a Script before deployment.

This is a powerful mechanism, we'd love to trigger the workflow mechanism in two other situations:

1.) We want to require Approval when a new deployment is conducted. Specifically when a new Package or Application is deployed, and especially when a new OSD Task Sequence is deployed to a collection.

2.) What if we have an existing Deployment that targets a collection? Someone could edit the collection and then add an Include rule for 'All of Our Super Prod Servers - Don't target deployments here' collection? Sure, it might limit their future employment prospects with our company, but they could use that approach to side-step the protections given in request #1. To protect against that, we'd want to trigger the Approval workflow when collection counts change by a configurable threshold.

We imagine this workflow presenti

@1RedOne
1RedOne / gist:44ce904e89b3da7d3a4eaed65be1cced
Created January 9, 2018 14:27 — forked from anonymous/gist:8078b779cdc84b09c05e66cfefff9550
A GUI-based tool that will search a given directory for all EXE's and DLL's and return file name, description, and version number.
$inputXML = @"
<Window x:Class="FileVersionChecker.MainWindow"
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:FileVersionChecker"
mc:Ignorable="d"
Title="FileVersionChecker" Height="350" Width="525">
<Grid>
@1RedOne
1RedOne / Azure-Redditbot.ps1
Created January 8, 2018 21:16
Functioning scaffolding for an Azure Function Serverless Bot written in PowerShell
#Boot up, load settings, check for a post that needs to alert
set-location D:\home\site\wwwroot\CheckForNewPosts\
$settings = get-content .\RedditSettings.json -Raw | ConvertFrom-Json
$time = "{0:yyyy-MM-dd HH:mm:ss}" -f (get-date)
. .\Send-RedditMessage.ps1
. .\Refresh-RedditToken.ps1
#load DB file
$Processed = Import-CSV .\processed.txt
@1RedOne
1RedOne / Get-CryptoPricing.ps1
Created December 29, 2017 17:42
Querying 30 day historical pricing of BTC, XMR and XRP using CryptoCompare
#The PriceHistorical Endpoint of cryptoCompare requires you pass in a Unix Time Stamp value.
#the unix TimeStamp works by setting the time of January 1st, 1970 as time 0. To this, seconds are added to resolve to the current date
#for instance, the date of November 29th, 2017 adds 1.5 Billion seconds to the origin time
#First, do some time math to get a Unix TimeStamp equal to 30 days ago
$30DayAgo = (get-date).AddDays(-30)
[datetime]$origin = '1970-01-01 00:00:00'
$ts = ($30DayAgo - $origin).TotalSeconds -as [int]
Write-host "Querying historical pricing for coins on date `n`t"
@1RedOne
1RedOne / config.txt
Created December 25, 2017 17:11
Monero XMR Stak Config
/* ----Place this file in the same directory as your xmr-stak.exe and replace the value for wallet address with your Monero Wallet
* To recieve e-mails if a worker goes offline, rename 'behemoth' to your worker name, and replace 'stephen@foxdeploy.com' with your e-mail
* Setting Name - description
* pool_address - Pool address should be in the form "pool.supportxmr.com:3333". Only stratum pools are supported.
* wallet_address - Your wallet, or pool login.
* pool_password - Can be empty in most cases or "x".
* use_nicehash - Limit the nonce to 3 bytes as required by nicehash.
* use_tls - This option will make us connect using Transport Layer Security.
* tls_fingerprint - Server's SHA256 fingerprint. If this string is non-empty then we will check the server's cert against it.
* pool_weight - Pool weight is a number telling the miner how important the pool is. Miner will mine mostly at the pool
@1RedOne
1RedOne / Connect-AWAccount.ps1
Created November 10, 2017 14:53
Persist Credentials
<#
.Synopsis
Use this cmdlet to safely store credentials for your AirWatch account for management via PowerShell
.DESCRIPTION
With one cmdlet, you can connect to your AirWatch account via the REST API. After using this cmdlet, you can use any of the other *AirWatch cmdlets to do things like upload an image or an album, etc (to come later)
.EXAMPLE
Connect-AWAccount -ClientID [String] -ClientSecret [ClientSecret]
.EXAMPLE
@1RedOne
1RedOne / Types.ps1xml
Created November 9, 2017 17:20
PSAirWatch Types
<?xml version="1.0" encoding="utf-8" ?>
<Types>
<Type>
<Name>AirWatch.Automation.Object.Device</Name>
<Members>
<ScriptProperty>
<Name>AcLineStatus</Name>
<GetScriptBlock>
$this.psbase.psbase.AcLineStatus
</GetScriptBlock>
@1RedOne
1RedOne / About.md
Last active January 24, 2018 11:28
Glorious PowerShell Dashboard Files