Skip to content

Instantly share code, notes, and snippets.

View teknogeek0's full-sized avatar
💭
☁️☁️☁️☁️☁️☁️☁️☁️

Chris Munns teknogeek0

💭
☁️☁️☁️☁️☁️☁️☁️☁️
View GitHub Profile
@teknogeek0
teknogeek0 / gist:0bbb90117df76d5d154cdeaa8b5c6d86
Created June 10, 2020 16:22
correct broken file from Monday
ec2-user: $ cd ~/environment/theme-park-backend/1-app-deploy/sam-app
Below is the line that is changed.
ec2-user:~/environment/theme-park-backend (master) $ git diff
diff --git a/1-app-deploy/sam-app/getUploadURL/app.js b/1-app-deploy/sam-app/getUploadURL/app.js
index 7a41827..d6f6834 100644
--- a/1-app-deploy/sam-app/getUploadURL/app.js
+++ b/1-app-deploy/sam-app/getUploadURL/app.js
@@ -15,7 +15,7 @@
$ aws s3 ls
Traceback (most recent call last):
File "/usr/local/bin/aws", line 19, in <module>
import awscli.clidriver
File "/Library/Python/2.7/site-packages/awscli/clidriver.py", line 17, in <module>
import botocore.session
File "/Library/Python/2.7/site-packages/botocore/session.py", line 26, in <module>
import botocore.credentials
File "/Library/Python/2.7/site-packages/botocore/credentials.py", line 22, in <module>
from dateutil.parser import parse
@teknogeek0
teknogeek0 / gist:4a881ec2853b6403a49a
Last active August 29, 2015 14:17
chef template issue?
in template:
relationship_cache_array_fraction=<%= (2000 / node['neo4j']['server']['jvm']['xmx'].to_i).to_f * 100 %>
in role:
"neo4j" : {
"server" : {
"jvm" : {
"xms" : "76800",
"xmx" : "76800",
@teknogeek0
teknogeek0 / travisci_iam_example
Created January 29, 2015 18:05
travisci IAM example
{
"Statement": [
{
"Sid": "Stmt1422554467931",
"Action": [
"s3:PutObject",
"s3:PutObjectAcl"
],
"Effect": "Allow",
"Resource": "arn:aws:s3:::mybucket/somepath/*",
@teknogeek0
teknogeek0 / gist:c7d0f69f91193bcd9dee
Created January 27, 2015 22:28
cloudformation needs fn::split
{
"ReversePrivateDNSRecord1" : {
"Type" : "AWS::Route53::RecordSet",
"Properties" : {
"HostedZoneId" : "XXXXXXXXXXX",
"Comment" : { "Fn::Join" : [ "", ["DNS name for instance in CF stack: ", { "Ref": "AWS::StackName" }]]},
"Name" : {
"Fn::Join" : [ "", [
{ "Fn::Select" : [ "3", {"Fn::Split" : [".", { "Fn::GetAtt" : [ "Host1", "PrivateIp" ] } ] }]},
".",
@teknogeek0
teknogeek0 / elb2s3failover.template
Created November 7, 2014 22:10
For Re:Invent 2014, Deployment Automation talk - ELB to S3 Website "Fail Whale" failover CloudFormation template
{
"AWSTemplateFormatVersion" : "2010-09-09",
"Description" : "Create a Route53 Fail Whale failover setup from ELB to S3. You need a preexisting ELB, S3 bucket configured as a Website endpoint, and Hosted Zone.",
"Parameters" : {
"ELBDnsName" : {
"Type" : "String",
"Description" : "Your ELB's DNS Name"
},
@teknogeek0
teknogeek0 / gist:772522436fc30bc459b0
Created November 2, 2014 21:32
kibana dashboard
{
"title": "Apache logs",
"services": {
"query": {
"list": {
"0": {
"query": "*",
"alias": "",
"color": "#7EB26D",
"id": 0,
#!/usr/bin/env ruby
require 'aws-sdk'
client = AWS::SimpleWorkflow.new(:region => "us-west-2")
puts "looking for a domain"
mydomain = client.domains['ReInvent2014']
if mydomain.exists?
if mydomain.workflow_types['EIPMapper','1.0'].exists?
template node[:deploy][:current_path]"/wp-config.php" do
How do I fix the above? I want to combine the node attributes with the file at the end.
Thanks,
-munns
@teknogeek0
teknogeek0 / gist:6690813
Created September 24, 2013 20:33
ebsraider
#!/bin/bash
# made by Chris Munns
host_info=`ec2-describe-instances | grep $HOSTNAME`
host_id=`echo $host_info | awk '{print $2}'`
host_zone=`echo $host_info | awk '{print $11}'`
SCHEDULER=deadline
MDADMCOM=/sbin/mdadm
volNum=$1
volSize=$2