Skip to content

Instantly share code, notes, and snippets.

View nmanzi's full-sized avatar
🌀
In a maelstrom of self indulgence.

Nathan Manzi nmanzi

🌀
In a maelstrom of self indulgence.
View GitHub Profile
@nmanzi
nmanzi / nexus.service
Last active January 5, 2018 14:05
Systemd script for Sonatype Nexus 2
[Unit]
Description=Nexus Service
After=network.target
[Service]
Type=forking
ExecStart=/opt/nexus/bin/nexus start
ExecStop=/opt/nexus/bin/nexus stop
ExecReload=/opt/nexus/bin/nexus restart
PIDFile=/var/run/nexus/nexus.pid
## Written by nathan.manzi@diverseit.com.au
## Required installation of the ACMESharp powershell module
## Follow installation steps at https://github.com/ebekker/ACMESharp/wiki/Quick-Start
##
Import-Module acmesharp
## !! Modify these variables before running script !!
$domain = "adfs.contoso.com"
$email = "jbloggs@contoso.com"
<!DOCTYPE html>
<html>
<head>
<style>
body {background-color: #EEE;}
.emubox {
border: 3px solid green;
padding: 10px;
}
.container{
[CmdletBinding(SupportsShouldProcess=$False)]
Param (
[parameter(
Mandatory=$true,
HelpMessage='Filter jobs by name')]
[string]$Filter,
[parameter(
#region Help
# ----------
<#
.SYNOPSIS
OracleZFS-StorageConsumptionReport.ps1 will send an email to a specified address when executed
with a list of projects (according to a filter) and the consumed backup storage for each project.
Highlights:
@nmanzi
nmanzi / gist:a6259f69cfe00c5ddf1e
Created December 15, 2015 03:55
pfSense 2.2 Graylog extractors
{
"extractors": [
{
"condition_type": "regex",
"condition_value": "^filterlog:.*,(in|out),4,.*",
"converters": [],
"cursor_strategy": "copy",
"extractor_config": {
"index": 17,
"split_by": ","
@nmanzi
nmanzi / NetApp-SnapshotReport.ps1
Created February 27, 2015 02:30
NetApp-SnapshotReport.ps1
#region Help
# ----------
<#
.SYNOPSIS
NetApp-SnapshotReport.ps1 will send an email to a specified address with a list of detected volume snapshots on
any volume belonging to specified controllers.
Highlights:
@nmanzi
nmanzi / NetApp-ActiveDedupAlert.ps1
Created February 24, 2015 08:41
NetApp-ActiveDedupAlert.ps1
#region Help
# ----------
<#
.SYNOPSIS
NetApp-ActiveDedupAlert.ps1 will send an email to a specified address if it detects a running SIS process on
any volume belonging to specified controllers.
Highlights:
DDavkTFBmKe5VNtQZftq3NJLncD6FWnQNz
Function ViewVM-SetState {
[cmdletBinding()]
Param (
[parameter(Mandatory=$true)]
[string]$vm, #VM name
[parameter(Mandatory=$true)]
[ValidateSet("MAINTENANCE","READY","DELETING","ERROR")]
[string]$state #State to set the VM to
)