View main.tf
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
locals { | |
tags = { | |
"pete" : "is-testing" | |
} | |
ami = "ami-053b0d53c279acc90" // Ubuntu | |
size = "m5.large" | |
pubkey = "~/.ssh/id_ed25519.pub" | |
networks = toset([ | |
{ | |
name = "server" |
View tls_notes.sh
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
# If you need to export certs from a k8s secret | |
kubectl get secret/my-secret -n istio-system -ojson | jq -r '.data["tls.key"]' | base64 --decode > tls.key | |
kubectl get secret/my-secret -n istio-system -ojson | jq -r '.data["tls.crt"]' | base64 --decode > tls.crt | |
kubectl get secret/my-secret -n istio-system -ojson | jq -r '.data["ca.crt"]' | base64 --decode > ca.crt | |
kubectl get secret/my-secret-cacert -ojson -n istio-system | jq -r '.data.cacert' | base64 --decode > chain.crt | |
# Create a mTLS server and connect to it with a client locally. This is useful | |
# for veryifying the entire stack of certificates work with each other. It will | |
# actually create a server listening on port 7569. | |
openssl s_server -accept 7569 -CAfile cacert.crt -cert tls.crt -key tls.key -Verify 10 -tls1_2 -state -quiet |
View geotiff-to-geojson.sh
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: | |
# - gdal_sieve.py | |
# - ogr2ogr (GDAL) | |
# - topojson (node.js) | |
# Grab the relative directory for source file. | |
SRC_DIR=`dirname $0` |
View functions.php
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
<?php | |
// If on events page get only upcoming events. | |
if (segments(2) === 'events' AND ! is_single()) | |
{ | |
// Our query overwrite. Fancy, hacky, wonderful. | |
function filter_where($where = '') | |
{ | |
global $wpdb; | |
$now = strtotime('now'); // Get current timestamp. |
View tictactoe.rs
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
use std::collections::HashMap; | |
use std::io; | |
use std::slice::Iter; | |
#[derive(Debug, PartialEq)] | |
enum Player { | |
X, | |
O, | |
} |
View bash.sh
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/sh | |
# Path to input files to merge. | |
FILES=${1-`pwd`}/files-to-merge | |
# Build directory name. | |
BUILD_DIR=build | |
# The outputted shapefile name. | |
OUTPUT_FILENAME=merged |
View store.tsx
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 React, { createContext, useReducer } from "react"; | |
import { CheckType } from "./types"; | |
import update from "immutability-helper"; | |
interface Action { | |
type: string; | |
payload: any; // @TODO | |
} | |
interface State { |
View main.go
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
package main | |
import ( | |
"context" | |
"io/ioutil" | |
"net/http" | |
"github.com/kr/pretty" | |
"google.golang.org/api/idtoken" | |
"google.golang.org/api/option" |
View create.sh
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/sh | |
# | |
# | |
# | |
# NOTE: This script is intended to be executed by root | |
# Executing it as another user could have undesired effects | |
########################################### |
View functions.php
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
<?php | |
/** | |
* -- Rye Configuration -- | |
* | |
* Here you can declare your javascript files, custom menus, | |
* widgetized areas, custom post types and taxonomies. | |
* | |
* | |
* Project Name: <Name> | |
* PHP Developer: <Your Name> |
NewerOlder