Skip to content

Instantly share code, notes, and snippets.

@hyperius
hyperius / dashboard.json
Created July 1, 2021 09:50
Grafana RDS dashboard
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
@hyperius
hyperius / QueueSizeCounter.java
Created October 17, 2019 15:34 — forked from sachin-handiekar/QueueSizeCounter.java
Get ActiveMQ Queue Size using MBean (Spring JMX) - QueueSizeCounter.java
package com.sample;
import javax.management.MBeanServerConnection;
import javax.management.ObjectName;
import org.apache.log4j.Logger;
public class QueueSizeCounter {
private MBeanServerConnection mBeanServerConnection;
resource "aws_ebs_volume" "ssp_api_docker" {
count = "${aws_instance.ssp_api.count}"
availability_zone = "${element(split(",", lookup(var.availability_zones, var.region)), count.index)}"
size = "${var.ebs_volume_ssp_api_docker_size}"
type = "${var.ebs_volume_ssp_api_docker_type}"
encrypted = true
kms_key_id = "${var.ebs_volume_ssp_api_docker_kms_key_id}"
@hyperius
hyperius / chean.sh
Created April 30, 2018 16:03
mac dns cache cleanup
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
@hyperius
hyperius / docker-compose.yml
Created January 24, 2018 12:26
Local Consul/Vault environment
version: "2"
services:
consul:
image: consul:latest
command: "agent -dev -client=0.0.0.0 -bind='{{ GetPrivateIP }}'"
ports:
- 8500:8500
vault:
<?php
$content = file_get_contents(__DIR__ . '/composer.json');
printf(
" \"hash\": \"%s\",\n \"content-hash\": \"%s\",\n",
md5($content),
getContentHash($content)
);