Skip to content

Instantly share code, notes, and snippets.

View daniloalsilva's full-sized avatar
🙃
entering game development

Danilo Silva daniloalsilva

🙃
entering game development
View GitHub Profile
@daniloalsilva
daniloalsilva / Collect-SensuPerfomanceStatistics.ps1
Created March 6, 2018 22:44
Script used to collect "Sensu-Client" statistics during defined execution time
# default ids
$sensuId = (Get-Process sensu-client).id
$rubyId = (gwmi win32_process | ? {$_.ParentProcessId -eq $sensuId}).ProcessId
# define execution in minutes
$initialTime = Get-Date
$execTime = $initialTime + [timespan]"0:05:00"
# create an empty hashtable
$procCount = @{}
@daniloalsilva
daniloalsilva / Create-PleskLicense.ps1
Last active October 12, 2025 04:41
Script used to create and retrieve a plesk license contents
<#
.Synopsis
Plesk Licensing script
.DESCRIPTION
Plesk Licensing script
This script intend to create a new license key in Plesk via API and
retrieve the XML content of created key in a plesk node.
@daniloalsilva
daniloalsilva / Plesk Service Plans.sql
Last active February 27, 2018 20:10
Select all service plans and its general info:
-- Select all service plans with Presence Builder enable:
select t.name, td.element, td.value
from templates t, TmplData td
where td.tmpl_id = t.id
and td.element = 'max_site_builder'
and td.value <> 0;
-- Select all domains with Presence Builder enable:
select c.login, d.name as domain, t.name as subscription, l.value as limit_value
from subscriptions su, subscriptionproperties sp, domains d, planssubscriptions p, templates t, clients c, limits l