+-------------------------------------+
| `iptables -L` below |
| |
| +--------+ +--------+ |
| | | | | |
+-----------------+ | | | |vnet0 | |
| | | | | | | |
| Laptop | ??? | | | +--------+ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<domain type='kvm'> | |
<name>k3s-001</name> | |
<uuid>fda3dee9-7b9e-42fd-9bf9-54f7e2829424</uuid> | |
<metadata> | |
<libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0"> | |
<libosinfo:os id="http://archlinux.org/archlinux/rolling"/> | |
</libosinfo:libosinfo> | |
<cockpit_machines:data xmlns:cockpit_machines="https://github.com/cockpit-project/cockpit/tree/master/pkg/machines"> | |
<cockpit_machines:has_install_phase>false</cockpit_machines:has_install_phase> | |
<cockpit_machines:install_source_type>disk_image</cockpit_machines:install_source_type> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
variable "fedora_32" { | |
default = "ami-0285100bb3546c0e7" | |
description = "Fedora 32 AMI id from https://alt.fedoraproject.org/cloud/" | |
} | |
variable "centos_7" { | |
default = "ami-0affd4508a5d2481b" | |
description = "Centos 7 AMI id from Amazon Marketplace" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#cloud-config | |
users: | |
- name: coleman | |
groups: | |
- wheel | |
shell: /bin/bash | |
sudo: ['ALL=(ALL) NOPASSWD:ALL'] | |
ssh-authorized-keys: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Requires gcloud and jq to be installed | |
# Get instance name and zone, required for our gcloud query | |
INSTANCE_NAME=$(curl --silent "http://metadata.google.internal/computeMetadata/v1/instance/name" -H "Metadata-Flavor: Google") | |
ZONE=$(curl --silent "http://metadata.google.internal/computeMetadata/v1/instance/zone" -H "Metadata-Flavor: Google") | |
# Get a giant blob of json with our instance's metadata | |
METADATA=$(gcloud compute instances describe $INSTANCE_NAME --zone $ZONE --format json) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>author</key> | |
<string>IceTimux / Andres Michel</string> | |
<key>name</key> | |
<string>One Dark</string> | |
<key>settings</key> | |
<array> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define("nginx/mod", ["require", "exports"], function (require, exports) { | |
"use strict"; | |
Object.defineProperty(exports, "__esModule", { value: true }); | |
exports.NginxPackage = "nginx"; | |
}); | |
define("install-nginx-ubuntu", ["require", "exports", "nginx/mod"], function (require, exports, mod_ts_1) { | |
"use strict"; | |
Object.defineProperty(exports, "__esModule", { value: true }); | |
async function main() { | |
// Install nginx with apt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# centos6 build | |
yum install -y glibc zlib-static flex-devel wget | |
fb_version="fluent-bit-1.2.1" | |
wget https://fluentbit.io/releases/1.2/$fb_version.tar.gz | |
tar -xzf $fb_version.tar.gz | |
cd ${fb_version}/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef LIST_H | |
#define LIST_H | |
#include <stdlib.h> | |
// linked list elements | |
typedef struct ListElm_ { | |
void *data; | |
struct ListElm_ *next; | |
} ListElm; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { dim, red, bold, italic, underline } from "https://deno.land/std/colors/mod.ts"; | |
function printEmptyELBs(elbs: object[]): void { | |
elbs["LoadBalancerDescriptions"].map((elb) => { | |
let name = elb["LoadBalancerName"]; | |
let dnsName = elb["DNSName"]; | |
if (elb["Instances"].length < 1) { | |
console.log(bold(red("Name:")), red(name)); | |
console.log(bold(red("DNS:")), red(dnsName)); | |
console.log(dim(red(" no instances"))); |