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";
@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 / cakegittmpdirs
Last active August 29, 2015 14:25 — forked from tijmenb/cakegittmpdirs
Regenerate and commit CakePHP 2.x tmp dirs. To use this for 3.x just update the logs dir paths
#!/bin/bash
# Based on: http://stackoverflow.com/questions/2218075/using-git-with-your-cakephp-project
# MAKE SURE you commit any changes you want to keep before running this!
#
# Usage:
# 1. Drop this bash script into the same level as tmp/
# 2. cd path/to/this && ./cakegittmpdirs
# Procedure:
// Source: https://groups.google.com/forum/#!topic/angular/hVrkvaHGOfc
// jsFiddle: http://jsfiddle.net/pkozlowski_opensource/PxdSP/14/
// author: Pawel Kozlowski
var myApp = angular.module('myApp', []);
//service style, probably the simplest one
myApp.service('helloWorldFromService', function() {
this.sayHello = function() {
return "Hello, World!"
'use strict';
/**
* This module monitors angularFire's authentication and performs actions based on authentication state.
* directives/directive.ngcloakauth.js depends on this file
*
* Modify ng-cloak to hide content until FirebaseSimpleLogin resolves. Also
* provides ng-show-auth methods for displaying content only when certain login
* states are active.
*
xgettext --from-code=utf-8 -k_e -k_x -k__ -o languages/default.pot $(find . -name "*.php")