Skip to content

Instantly share code, notes, and snippets.

@dduvnjak
dduvnjak / getStackOutputs.js
Last active April 1, 2024 09:03 — forked from kwilczynski/getStackOutputs.js
Get outputs from a stack by name in CloudFormation. Uses AWS SDK v3, compatible with Node.js 20.x runtime.
'use strict';
const { CloudFormationClient, DescribeStacksCommand } = require('@aws-sdk/client-cloudformation');
const { HttpRequest } = require('@aws-sdk/protocol-http');
const { NodeHttpHandler } = require('@aws-sdk/node-http-handler');
const url = require('node:url');
async function getStackOutputs(properties) {
if (typeof properties.StackName === 'undefined') {
throw new Error('The StackName property was not specified.');
@dduvnjak
dduvnjak / pre-commit
Last active September 26, 2023 00:29 — forked from DmZ/pre-commit
Git pre-commit hook to search for Amazon AWS API keys.
#!/bin/sh
if git rev-parse --verify HEAD >/dev/null 2>&1
then
against=HEAD
else
# Initial commit: diff against an empty tree object
against=5da2c1fe8f6458e32d11110e0ebdd915e472c6e0
fi
@dduvnjak
dduvnjak / wildfly-install.sh
Last active December 2, 2015 22:46 — forked from sukharevd/wildfly-install.sh
Script to install JBoss Wildfly 10.x as service in Linux
#!/bin/bash
#title :wildfly-install.sh
#description :The script to install Wildfly 10.x
#more :http://sukharevd.net/wildfly-8-installation.html
#author :Dmitriy Sukharev
#date :2015-10-24T17:14-0700
#usage :/bin/bash wildfly-install.sh
#tested-version :10.0.0.CR3
#tested-distros :Debian 7,8; Ubuntu 15.10; CentOS 7; Fedora 22

file directory layout:

|- index.html
|- manifest.appcache
|- static/
|  |- 00786df954089f14eaca25061f454957.svg
|  `- bb796e8931c52593d86ec07a0246e1e6.css
|_ polyfiller/
   `- shims/
@dduvnjak
dduvnjak / README.md
Last active December 17, 2015 06:18 — forked from oodavid/README.md

Backup MySQL to Amazon S3

This is a simple way to backup your MySQL tables to Amazon S3 for a nightly backup - this is all to be done on your server :-)

Sister Document - Restore MySQL from Amazon S3 - read that next

1 - Install s3cmd

this is for Centos 5.6, see http://s3tools.org/repositories for other systems like ubuntu etc