Linux only, requires KVM and QEMU. libvirt and related components need to be installed. Provisions a development VM based on Ubuntu 20.04. Current working directory will be shared with the guest. This is a PoC, not intended to be a fully functional tool. For any serious use case, use something like Vagrant
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
const CLIENT_ID = '...'; | |
const CLIENT_SECRET = '...'; | |
const refreshToken = '...' | |
async function refreshAccessToken() { | |
const tokenData = `${CLIENT_ID}:${CLIENT_SECRET}`; | |
const base64token = btoa(tokenData); | |
const data = new URLSearchParams(); |
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 | |
// Loosely based on https://www.alexedwards.net/blog/making-and-using-middleware | |
// and https://blog.questionable.services/article/guide-logging-middleware-go/ | |
// Similar to https://github.com/justinas/alice but more minimalist :) | |
import ( | |
"log" | |
"net/http" | |
) |
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 ( | |
"log" | |
"net/http" | |
) | |
func main() { | |
handler := &myHandler{} | |
mux := http.NewServeMux() |
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
echo "eu-central-1" | sed -E s'/([a-z]{2})-([a-z]{1})[a-z]+-([0-9]{1})/|\1\2\3|/' # 'euc1' |
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
{ | |
"[terraform]": { | |
"editor.formatOnSave": true, | |
"editor.tabSize": 2 | |
}, | |
"terraform.indexing": { | |
"enabled": false, | |
"liveIndexing": false, | |
"delay": 500, | |
"exclude": [ |
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
RISK=5 | |
[[ $(( ( RANDOM % 6 ) + 1 )) -gt $RISK ]] && echo "terraform destroy -target module.production_db -auto-approve" |
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
# for discussion and alternatives, see https://unix.stackexchange.com/questions/227662/how-to-rename-multiple-files-using-find | |
find . -type f -name general.tf -not -path '*/.terraform/*' -exec sh -c 'x="{}"; mv "$x" "${x/general/backend}"' \; |
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"?> | |
<!-- | |
Licensed to the Apache Software Foundation (ASF) under one or more | |
contributor license agreements. See the NOTICE file distributed with | |
this work for additional information regarding copyright ownership. | |
The ASF licenses this file to You under the Apache License, Version 2.0 | |
(the "License"); you may not use this file except in compliance with | |
the License. You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 |
NewerOlder