Skip to content

Instantly share code, notes, and snippets.

View imseandavis's full-sized avatar

Sean Davis imseandavis

View GitHub Profile
<#
.NOTES
-------------------------------------
Name: Export-MediaFileDetails.ps1
Version: 3.0a - 01/15/2017
Author: Randy E. Turner
Email: [email protected]
-------------------------------------
.SYNOPSIS
@imseandavis
imseandavis / DownloadFilesFromRepo.ps1
Created September 8, 2021 19:29 — forked from zerotag/DownloadFilesFromRepo.ps1
PowerShell function to download files from a GitHub repository
function DownloadFilesFromRepo {
<#
.SYNOPSIS
This function retrieves the specified repository on GitHub to a local directory with authentication.
.DESCRIPTION
This function retrieves the specified repository on GitHub to a local directory with authentication, being a single file, a complete folder, or the entire repository.
.PARAMETER User
@imseandavis
imseandavis / dss2emails.sh
Created April 10, 2021 23:37 — forked from willfurnass/dss2emails.sh
Extract usernames and emails from a Synology DSS config dump file (.dss)
#!/bin/bash
# Will Furnass
# Oct 2017
if [[ $# -lt 1 ]]; then
echo 1>&2 "Extract list of user email addresses from Synology DSS '.dss' config dump"
exit 1
fi
dss_path="$1"
@imseandavis
imseandavis / preprocessor_fun.h
Created January 14, 2021 23:28 — forked from aras-p/preprocessor_fun.h
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
@imseandavis
imseandavis / chefquery.ps1
Created May 13, 2016 22:52 — forked from devblackops/chefquery.ps1
PowerShell script to query Chef nodes via REST API. Assumes you have the BouncyCastle.Crypto.dll in the same folder as the script.
function Get-Base64 {
param (
$data
)
# if the $data is a string then ensure it is a byte array
if ($data.GetType().Name -eq "String") {
$data = [System.Text.Encoding]::UTF8.GetBytes($data)
}