Skip to content

Instantly share code, notes, and snippets.

View billyteves's full-sized avatar
💭
I may be slow to respond.

Billy Teves billyteves

💭
I may be slow to respond.
View GitHub Profile
@billyteves
billyteves / README.md
Created February 24, 2017 18:05 — forked from leonardofed/README.md
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.

For more about AWS and AWS Certifications you can follow me @leonardofed


@billyteves
billyteves / elasticat.json
Created August 11, 2017 15:09 — forked from donavanm/elasticat.json
CloudFormation EC2 & Route53 template
{
"AWSTemplateFormatVersion" : "2010-09-09",
"Description" : "Create an EC2 instance, set up Apache, and create Route53 A records",
"Parameters" : {
"KeyName" : {
"Description" : "Name of an existing EC2 KeyPair to enable SSH access to the instances",
"Type" : "String",
<?php
if (class_exists('Memcache')) {
$server = 'localhost';
if (!empty($_REQUEST['server'])) {
$server = $_REQUEST['server'];
}
$memcache = new Memcache;
$isMemcacheAvailable = @$memcache->connect($server);
if ($isMemcacheAvailable) {
@billyteves
billyteves / k8s-svc-annotations.md
Created November 4, 2017 06:11 — forked from mgoodness/k8s-svc-annotations.md
AWS ELB-related annotations for Kubernetes Services (v1.5)
  • service.beta.kubernetes.io/aws-load-balancer-access-log-emit-interval (in minutes)
  • service.beta.kubernetes.io/aws-load-balancer-access-log-enabled (true|false)
  • service.beta.kubernetes.io/aws-load-balancer-access-log-s3-bucket-name
  • service.beta.kubernetes.io/aws-load-balancer-access-log-s3-bucket-prefix
  • service.beta.kubernetes.io/aws-load-balancer-backend-protocol (http|https|ssl|tcp)
  • service.beta.kubernetes.io/aws-load-balancer-connection-draining-enabled (true|false)
  • service.beta.kubernetes.io/aws-load-balancer-connection-draining-timeout (in seconds)
@billyteves
billyteves / fluentd-config.yaml
Created November 8, 2017 03:50 — forked from mgoodness/fluentd-config.yaml
Fluentd configuration for shipping systemd & Kubernetes logs to CloudWatch Logs
---
kind: ConfigMap
apiVersion: v1
metadata:
labels:
app: fluentd
name: fluentd-cloudwatch-logs
namespace: kube-system
data:
aws-region: us-east-1
@billyteves
billyteves / rpmrebuild.sh
Created December 4, 2017 13:31 — forked from andrewkroh/rpmrebuild.sh
Changing RPM Version and Release with rpmrebuild
yum install rpmrebuild -y
mkdir output
# If your RPMs do not contain all of the tags defined in this preamble
# then use the --change-spec-preamble flag to modify the preamble.
cat /usr/lib/rpmrebuild/rpmrebuild_rpmqf.src
# Change the RPM's release number to 2. Ignore Distribution and URL.
rpmrebuild -p --notest-install \
@billyteves
billyteves / Dockerfile
Created December 20, 2017 11:16 — forked from kovagoz/Dockerfile
Alpine Linux with PHP 5.6 FPM and Mongo module
FROM php:5.6-fpm-alpine
RUN apk update && apk add autoconf openssl-dev g++ make && \
pecl install mongo && \
docker-php-ext-enable mongo && \
apk del --purge autoconf openssl-dev g++ make
@billyteves
billyteves / RDS-Aurora-CloudFormation-Example.yaml
Created January 9, 2018 14:17 — 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
@billyteves
billyteves / postgres-cheatsheet.md
Created January 12, 2018 07:02 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@billyteves
billyteves / tf
Created February 8, 2018 14:36 — forked from AndrewFarley/tf
Elasticache replication group with Cloudformation and controlled by Terraform
resource "template_file" "cf" {
vars {
cluster_name = "${var.cluster_name}"
csg_name = "${aws_elasticache_subnet_group.default_redis_sg.name}"
cluster_internal_sg_id = "${module.ecs-cluster.cluster_internal_sg_id}"
}
template = <<STACK
{
"Resources" : {