Skip to content

Instantly share code, notes, and snippets.

View yyolk's full-sized avatar
๐Ÿฏ
๐™ง๐™š๐™˜๐™ช๐™ง๐™จ๐™ž๐™ซ๐™š ๐™ฉ๐™–๐™ช๐™ฉ๐™ค๐™ก๐™ค๐™œ๐™ฎ

Joseph Chiocchi yyolk

๐Ÿฏ
๐™ง๐™š๐™˜๐™ช๐™ง๐™จ๐™ž๐™ซ๐™š ๐™ฉ๐™–๐™ช๐™ฉ๐™ค๐™ก๐™ค๐™œ๐™ฎ
View GitHub Profile
@yyolk
yyolk / moment-range-tz.js
Created July 30, 2017 19:57
dont pollute the namespace - just loads 'moment'
const moment = (function() {
const Moment = require('moment-timezone');
const MomentRange = require('moment-range');
return MomentRange.extendMoment(Moment);
}());
@yyolk
yyolk / RDS-Aurora-CloudFormation-Example.yaml
Created March 2, 2017 19:21 — forked from sjparkinson/RDS-Aurora-CloudFormation-Example.yaml
A basic CloudFormation template for an RDS Aurora cluster.
---
AWSTemplateFormatVersion: 2010-09-09
Description: A basic CloudFormation template for an RDS Aurora cluster.
Parameters:
DatabaseInstanceType:
Default: db.r3.large
AllowedValues:
- db.r3.large
- db.r3.xlarge
- db.r3.2xlarge
@yyolk
yyolk / gist:b74660e9b039a69d6623e9d928b80b6c
Created January 15, 2017 23:36 — forked from sunggun-yu/gist:4416430
Install NMON - CentOS 64bit
# Get Root
sudo su
# Download NMON archive
cd /tmp
wget http://nmon.sourceforge.net/docs/MPG_nmon_for_Linux_14a_binaries.zip
# Install unzip if you don't have
yum install unzip
@yyolk
yyolk / encoding-helpers.ps1
Created May 8, 2016 19:54 — forked from jpoehls/encoding-helpers.ps1
Convert-FileEncoding and Get-FileEncoding
<#
.SYNOPSIS
Converts files to the given encoding.
Matches the include pattern recursively under the given path.
.EXAMPLE
Convert-FileEncoding -Include *.js -Path scripts -Encoding UTF8
#>
function Convert-FileEncoding([string]$Include, [string]$Path, [string]$Encoding='UTF8') {
$count = 0
@yyolk
yyolk / install.sh
Last active October 14, 2016 10:54
Install RabbitMQ on Amazon linux, along with Erlang
# Modify /etc/yum.repos.d/epel.repo. Under the section marked [epel], change enabled=0 to enabled=1.
sudo yum install erlang --enablerepo=epel
wget http://www.rabbitmq.com/releases/rabbitmq-server/v3.1.1/rabbitmq-server-3.1.1-1.noarch.rpm
sudo rpm -Uvh rabbitmq-server-3.1.1-1.noarch.rpm
# Enable managament plugin
sudo rabbitmq-plugins enable rabbitmq_management
@yyolk
yyolk / BundleConfig.ps1
Created March 4, 2016 21:14 — forked from mefellows/BundleConfig.ps1
Sysprepped Windows AMI using Packer
$EC2SettingsFile="C:\\Program Files\\Amazon\\Ec2ConfigService\\Settings\\BundleConfig.xml"
$xml = [xml](get-content $EC2SettingsFile)
$xmlElement = $xml.get_DocumentElement()
foreach ($element in $xmlElement.Property)
{
if ($element.Name -eq "AutoSysprep")
{
$element.Value="Yes"
}
#--------------------
#
# Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Customer Agreement (the โ€œLicenseโ€). You may not use this file except in compliance with the License. A copy of the License is located at
#
# http://aws.amazon.com/agreement
#
# or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
#
@yyolk
yyolk / cloudwatch-spot-price-metrics.sh
Created February 23, 2016 22:51 — forked from muhqu/cloudwatch-spot-price-metrics.sh
Shell Script to bring EC2 SpotInstance Prices to CloudWatch.
#!/bin/bash
#
# The MIT License (MIT)
#
# Copyright (c) 2013 Mathias Leppich <[email protected]>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@yyolk
yyolk / packer-ebs-snapshot-id
Created February 11, 2016 21:39 — forked from stefanteixeira/packer-ebs-snapshot-id
Get EBS Snapshot ID from a Packer build
packer build -machine-readable packer.json | tee build.log
grep 'artifact,0,id' build.log | cut -d, -f6 | cut -d: -f2
@yyolk
yyolk / AWS CloudFormation SNS Subscription.json
Created December 4, 2015 23:54
AWS CloudFormation SNS Subscription
{
"AWSTemplateFormatVersion": "2010-09-09",
"Resources": {
"Topic": {
"Type": "AWS::SNS::Topic",
"Properties": {
}
},
"Queue": {
"Type": "AWS::SQS::Queue",