Skip to content

Instantly share code, notes, and snippets.

View kyl191's full-sized avatar

Kyle Lexmond kyl191

View GitHub Profile
@kyl191
kyl191 / pub.sh
Last active June 16, 2018 20:26
Fedora on GCE
#!/bin/bash
set -e
# Get the image - Image must be names disk.raw
curl -L https://download.fedoraproject.org/pub/fedora/linux/releases/28/Cloud/x86_64/images/Fedora-Cloud-Base-28-1.1.x86_64.raw.xz | xz --decompress > disk.raw
# Create the temp bucket to hold the file
export BUCKET=$(cat /dev/urandom| tr -dc 'a-z0-9' | fold -w 32 | head -n 1)
gsutil mb gs://${BUCKET}
# tar & compress the file and upload it
export TARFILE=Fedora-Cloud-Base-28.tar.gz
tar -Sczf ${TARFILE} disk.raw && gsutil mv ${TARFILE} gs://${BUCKET}
@kyl191
kyl191 / google-cloud.repo
Created June 16, 2018 20:26
Hardcoded Google Cloud repo for Fedora
[google-cloud-compute]
name=Google Cloud Compute
baseurl=https://packages.cloud.google.com/yum/repos/google-cloud-compute-el7-x86_64
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg
https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
@kyl191
kyl191 / css.patch
Created June 24, 2018 01:31
CSS patch to align 138px thumbnails on Zenphoto
--- dark.css.ori 2018-06-24 00:55:25.001595046 +0000
+++ dark.css 2018-06-24 01:30:02.656363668 +0000
@@ -237,7 +237,7 @@
------------------------------ */
#images {
float: left;
- width: 650px;
+ width: 685px;
border: 0px solid gray;
}
data.aws_ebs_default_kms_key.current: Refreshing state...
2020-06-21T18:06:20.295-0700 [DEBUG] plugin.terraform-provider-aws_v2.67.0_x4:
2020/06/21 18:06:20 [DEBUG] [aws-sdk-go] DEBUG: Request ec2/GetEbsDefaultKmsKeyId Details:
2020-06-21T18:06:20.295-0700 [DEBUG] plugin.terraform-provider-aws_v2.67.0_x4: ---[ REQUEST POST-SIGN ]-----------------------------
2020-06-21T18:06:20.295-0700 [DEBUG] plugin.terraform-provider-aws_v2.67.0_x4: POST / HTTP/1.1
2020-06-21T18:06:20.295-0700 [DEBUG] plugin.terraform-provider-aws_v2.67.0_x4: Host: ec2.us-west-2.amazonaws.com
2020-06-21T18:06:20.295-0700 [DEBUG] plugin.terraform-provider-aws_v2.67.0_x4: User-Agent: aws-sdk-go/1.32.3 (go1.13.7; linux; amd64) APN/1.0 HashiCorp/1.0 Terraform/0.12.26 (+https://www.terraform.io)
2020-06-21T18:06:20.295-0700 [DEBUG] plugin.terraform-provider-aws_v2.67.0_x4: Content-Length: 47
2020-06-21T18:06:20.295-0700 [DEBUG] pl
@kyl191
kyl191 / ec2.tf
Created June 29, 2020 06:02
minimal fedora ec2 instance with IPv6 support + no magic constants
resource "aws_key_pair" "ansible_key" {
key_name = "ansible_key"
public_key = file("id_rsa.pub")
}
data "aws_ami" "fedora_cloud" {
owners = [125523088429] # fedora infra
most_recent = true
filter {