Skip to content

Instantly share code, notes, and snippets.

Tell apache to gracefully reload its configuration. May need to use sudo.

$ apache2ctl graceful

@caasig
caasig / tls_test.php
Created April 19, 2018 04:15 — forked from olivierbellone/tls_test.php
Simple TLS version test for PHP, using howsmyssl.com
<?php
$ch = curl_init('https://www.howsmyssl.com/a/check');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$data = curl_exec($ch);
curl_close($ch);
$json = json_decode($data);
echo "<pre>TLS version: " . $json->tls_version . "</pre>\n";
@caasig
caasig / GeneratesXml.php
Created February 18, 2021 10:51 — forked from stevebauman/GeneratesXml.php
A Scheduled Tasks XML File Generator using PHP, Laravel and Spatie - Array-to-XML
<?php
namespace App\System;
use Spatie\ArrayToXml\ArrayToXml;
trait GeneratesXml
{
/**
* The XML template.
@caasig
caasig / Get-FileShareReport.ps1
Created March 15, 2021 03:40 — forked from aaronpmiller/Get-FileShareReport.ps1
PowerShell script to create a CSV file containing a list of ACEs (access control entries) for all file paths at and under the root path specified.
<#
.SYNOPSIS
Create a CSV file containing a list of ACEs (access control entries) for all file paths at and under the root path specified.
.DESCRIPTION
This script will pull a list of all directory at and under the root path specified.
In a parallel process it will pull the ACL for each directory and list out each ACE that is not inherited, the ACEs in the root ACL will be listed as is inherited or not.
This script uses the NTFSSecurity module (http://ntfssecurity.codeplex.com/) to work around long path issues via an embeded AlphaFS .NET class. Please ensure this module in in the PSModulePath. As an added benefity this class appears to be faster at enumerating directories as well.
@caasig
caasig / buildspec-terraform-symlinks.yml
Created May 8, 2024 04:26 — forked from medwig/buildspec-terraform-symlinks.yml
Repair symlinks in AWS codepipeline
{
"metrics": [
[ { "expression": "pricestorage+(ecpus/1000000*0.0038)", "label": "Serverless Elasticache Pricing", "id": "price", "yAxis": "right" } ],
[ { "expression": "SUM(METRICS())/1000", "label": "ECPus", "id": "ecpus" } ],
[ { "expression": "$YOUR_CLUSTER_GB_SIZE*0.14*24*30", "label": "PriceStorage", "id": "pricestorage", "yAxis": "right", "visible": false } ],
[ "AWS/ElastiCache", "NetworkBytesOut", "CacheClusterId", "$YOUR_CLUSTER_NAME-001", "CacheNodeId", "0001", { "region": "$YOUR_REGION", "id": "m1", "visible": false } ],
[ "...", "$YOUR_CLUSTER_NAME-002", ".", ".", { "region": "$YOUR_REGION", "id": "m2", "visible": false } ],
[ "...", "$YOUR_CLUSTER_NAME-003", ".", ".", { "region": "$YOUR_REGION", "id": "m3", "visible": false } ],
[ ".", "NetworkBytesIn", ".", "$YOUR_CLUSTER_NAME-001", ".", ".", { "region": "$YOUR_REGION", "id": "m4", "visible": false } ],
[ "...", "$YOUR_CLUSTER_NAME-002", ".", ".", { "region": "$YOUR_REGION", "