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
resource "random_string" "random" { | |
length = 8 | |
special = false | |
upper = false | |
number = false | |
} | |
resource "azurerm_public_ip" "vpn_ip" { | |
name = "vpn-ip" |
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
{ | |
"$schema": "http://json-schema.org/draft-07/schema#", | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"type": { | |
"enum": [ | |
"image", | |
"context", |
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
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "Launch", | |
"type": "go", | |
"request": "launch", | |
"mode": "debug", | |
"remotePath": "", |
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
/** | |
* Creates a read/writable property which returns a function set for write/set (assignment) | |
* and read/get access on a variable | |
* | |
* @param {Any} value initial value of the property | |
*/ | |
function createProperty(value) { | |
var _value = value; | |
/** |
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
db_path = "~/.config/atuin/history.db" | |
dialect = "uk" | |
style = "compact" | |
inline_height = 25 | |
invert = true | |
update_check = false | |
sync_frequency = "5m" | |
{{- if eq (env "CODESPACES") "true" }} | |
auto_sync = true |
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
# https://bendews.com/posts/implement-dns-over-https | |
configure | |
set service dns forwarding options "no-resolv" | |
set service dns forwarding options "server=127.0.0.1#5053" | |
delete service dns forwarding options "server=1.1.1.1" | |
commit | |
save | |
exit | |
sudo /etc/init.d/dnsmasq force-reload |
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
# Get the functions keys out of the app | |
resource "azurerm_template_deployment" "function_keys" { | |
name = "javafunckeys${var.random_name_ending}" | |
parameters = { | |
"functionApp" = "${azurerm_function_app.function-app.name}" | |
} | |
resource_group_name = "${var.resource_group_name}" | |
deployment_mode = "Incremental" |
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
# Here is the basic Rego rule | |
package main | |
# deny creating duplicate resource in the same namespace | |
deny_duplicate_resources[{"msg": msg, "details": details}] { | |
i != j | |
currentFilePath = input[i].path | |
input[i].contents.kind == input[j].contents.kind | |
input[i].contents.metadata.name == input[j].contents.metadata.name |
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 | |
set -e | |
function cleanup() | |
{ | |
echo -e "----> Trap caught! Do cleanup here" | |
} | |
trap cleanup EXIT | |
# imagine some stuff happens here |
NewerOlder