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 "digitalocean_droplet" "devbox" { | |
image = var.image | |
name = var.name | |
region = var.region | |
size = var.size | |
tags = var.tags | |
ssh_keys = [ | |
data.digitalocean_ssh_key.terraform.id | |
] |
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
data "http" "myip" { | |
url = "http://ipv4.icanhazip.com" | |
} | |
resource "digitalocean_firewall" "devbox" { | |
name = "demo-devbox-firewall" | |
droplet_ids = [digitalocean_droplet.devbox.id] | |
inbound_rule { |
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
do_token = "xxx" | |
do_private_key = "terraform-devbox" | |
image = "ubuntu-22-04-x64" | |
name = "demo-devbox" | |
region = "sgp1" | |
size = "s-2vcpu-4gb" | |
tags = ["devbox", "demo"] |
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 { | |
required_providers { | |
digitalocean = { | |
source = "digitalocean/digitalocean" | |
version = "2.12.0" | |
} | |
} | |
} | |
provider "digitalocean" { |
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 "digitalocean_droplet" "web" { | |
image = "ubuntu-22-04-x64" | |
name = "devbox" | |
region = "sgp1" | |
size = "s-2vcpu-4gb" | |
tags = ["devbox"] | |
lifecycle { | |
prevent_destroy = false | |
} |
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
{ | |
"variables": { | |
"aws_access_key": "ACCESSKEY", | |
"aws_secret_key": "SECRETKEY", | |
"aws_subnet_id": "SUBNETID" | |
}, | |
"builders": [ | |
{ | |
"type": "amazon-ebs", | |
"access_key": "{{user `aws_access_key`}}", |
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
root@minion:~# apt-get -q -y -o DPkg::Options::=--force-confold -o DPkg::Options::=--force-confdef install ksm-control-daemon | |
Reading package lists... | |
Building dependency tree... | |
Reading state information... | |
The following packages were automatically installed and are no longer required: | |
libuuid-perl linux-base | |
Use 'apt-get autoremove' to remove them. | |
The following NEW packages will be installed: | |
ksm-control-daemon | |
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. |
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
postgresql-9.4 (9.4.18-0+deb8u1) jessie; urgency=medium | |
Some functions were incorrectly not marked as VOLATILE. If you are using any | |
of these functions, consult the release notes for instructions. | |
query_to_xml cursor_to_xml cursor_to_xmlschema query_to_xmlschema | |
query_to_xml_and_xmlschema | |
-- Christoph Berg <[email protected]> Tue, 08 May 2018 20:37:04 +0200 |
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
## | |
# Host Database | |
# | |
# localhost is used to configure the loopback interface | |
# when the system is booting. Do not change this entry. | |
## | |
255.255.255.255 broadcasthost | |
::1 localhost | |
127.0.0.1 localhost | |
127.0.0.1 localunixsocket |
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
from smtplib import SMTP | |
import datetime | |
debuglevel = 0 | |
smtp = SMTP() | |
smtp.set_debuglevel(debuglevel) | |
smtp.connect('YOUR.MAIL.SERVER', 26) | |
smtp.login('USERNAME@DOMAIN', 'PASSWORD') |
NewerOlder