Skip to content

Instantly share code, notes, and snippets.

{
"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", "
@caasig
caasig / buildspec-terraform-symlinks.yml
Created May 8, 2024 04:26 — forked from medwig/buildspec-terraform-symlinks.yml
Repair symlinks in AWS codepipeline
@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 / 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 / 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";

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

$ apache2ctl graceful

/* global module */
/**
* Based on https://github.com/substack/node-browserify/issues/1044#issuecomment-139384663
*/
(function (module) {
module.exports = bundleEntry;
var through2 = require('through2'),
browserify = require('browserify'),
@caasig
caasig / demo.html
Created January 12, 2016 05:04 — forked from anonymous/demo.html
AngularJS: Mutually Exclusive Input Validation
<html ng-app="myApp">
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js"></script>
<script>
var myApp = angular.module("myApp",[]) ;
myApp.controller('MyCtrl', ['$scope', function($scope) {
$scope.formModel = {};
}]);
myApp.directive('mutuallyExclusive', function() {
@caasig
caasig / composer.json
Last active November 26, 2015 11:22
Starter composer.json for a Magento 1 project
{
"name": "vendor/your-project",
"description": "Your Awesome Project",
"require": {
"aydin-hassan/magento-core-composer-installer": "^1.3",
"magento/magento": "1.9.2.2",
"magento-hackathon/magento-composer-installer": "3.0.*"
},
"repositories": [
{