This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <# | |
| .NOTES | |
| ------------------------------------- | |
| Name: Export-MediaFileDetails.ps1 | |
| Version: 3.0a - 01/15/2017 | |
| Author: Randy E. Turner | |
| Email: [email protected] | |
| ------------------------------------- | |
| .SYNOPSIS |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 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, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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) | |
| } |