Skip to content

Instantly share code, notes, and snippets.

@evilensky
evilensky / kemp-cert-update.sh
Created December 10, 2020 23:43 — forked from colinwilson/kemp-cert-update.sh
Bash script to update certificates on KEMPs Loadmaster Load balancer via pfSense's ACME package.
#!/bin/sh
#
# Title: Auto-Update & Upload LetsEncrypt Certs to KEMP LoadMaster
# Guide/Source: https://colinwilson.uk/2017/06/19/auto-update-ssl-certificates-on-kemp-loadmaster-via-pfsense--lets-encrypt/
# Created: 12/06/2017
# Author: Colin Wilson @colinwilson
# Vendor or Software Link: https://www.pfsense.org/ , https://kemptechnologies.com
# Version: 1.1.0
# Category: BASH Shell Script
@evilensky
evilensky / gist:801abfe11a4412e34b597436eddd3656
Created July 26, 2020 20:31 — forked from prziborowski/gist:ba3ebf610dd6cca3f4e7be5e2874499f
Use property collector to retrieve names quickly
#!/usr/bin/env python
"""
Written by Nathan Prziborowski
Github: https://github.com/prziborowski
This code is released under the terms of the Apache 2
http://www.apache.org/licenses/LICENSE-2.0.html
The property collector can be used to fetch a subset of properties
for a large amount of objects with fewer round trips that iterating.
This sample shows how to use the TraversalSpec to get properties
of another object without multiple calls.
@evilensky
evilensky / gist:c3e62b7fe0221754f3b0e6e4b4c2c71a
Created July 26, 2020 20:31 — forked from prziborowski/gist:ba3ebf610dd6cca3f4e7be5e2874499f
Use property collector to retrieve names quickly
#!/usr/bin/env python
"""
Written by Nathan Prziborowski
Github: https://github.com/prziborowski
This code is released under the terms of the Apache 2
http://www.apache.org/licenses/LICENSE-2.0.html
The property collector can be used to fetch a subset of properties
for a large amount of objects with fewer round trips that iterating.
This sample shows how to use the TraversalSpec to get properties
of another object without multiple calls.
@evilensky
evilensky / StoreOnce-Report.ps1
Created June 4, 2019 22:29 — forked from vMarkusK/StoreOnce-Report.ps1
Reports StoreOnce Catalyst Stores via RESTapi
# Workaround for SelfSigned Cert
add-type @"
using System.Net;
using System.Security.Cryptography.X509Certificates;
public class TrustAllCertsPolicy : ICertificatePolicy {
public bool CheckValidationResult(
ServicePoint srvPoint, X509Certificate certificate,
WebRequest request, int certificateProblem) {
return true;
}
@evilensky
evilensky / powershell-non-domain-remoting.md
Created November 5, 2018 19:36 — forked from cmcginty/powershell-non-domain-remoting.md
Windows Powershell Remoting into Non-Domain Joined System

Powershell Remoting to a Non-Domain Host

  1. From an admin shell, enable PS remoting on the machine you wish to access:
New-ItemProperty -Name LocalAccountTokenFilterPolicy `
  -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System 
  -PropertyType DWord -Value 1

Enable-PsRemoting -Force
#requires -Version 3.0
<#
.SYNOPSIS
My Veeam Report is a flexible reporting script for Veeam Backup and
Replication.
.DESCRIPTION
My Veeam Report is a flexible reporting script for Veeam Backup and
Replication. This report can be customized to report on Backup, Replication,
import os
import pprint
import fnmatch
import time
import subprocess
def find_services_needing_restart():
services = {}
pids = [ f for f in os.listdir('/proc') if f.isdigit() and os.path.isdir(os.path.join('/proc', f)) ]
#!/usr/local/bin/ruby
require 'rubygems'
gem 'passenger'
require 'phusion_passenger'
require 'phusion_passenger/platform_info'
require 'phusion_passenger/admin_tools/memory_stats'
require 'optparse'
include PhusionPassenger
#!/usr/bin/env ruby
def output_config
puts <<-END
graph_category App
graph_title passenger status
graph_vlabel count
sessions.label sessions
max.label max processes
@evilensky
evilensky / git.cap
Created February 14, 2014 01:45 — forked from corny/git.cap
# Save this file as lib/capistrano/tasks/git.cap
namespace :git do
desc 'Copy repo to releases'
task create_release: :'git:update' do
on roles(:all) do
with fetch(:git_environmental_variables) do
within repo_path do
execute :git, :clone, '-b', fetch(:branch), '--recursive', '.', release_path
end