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
--- | |
- hosts: webserver | |
become: true | |
gather_facts: false | |
vars: | |
# API token should be created with cache_purge permissions. | |
cloudflare_purge_zone: [zone id from cloudflare] | |
cloudflare_purge_token: "{{ lookup('env','CLOUDFLARE_PURGE_TOKEN') }}" | |
cloudflare_purge_body: |
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 | |
# This simple bash script will auto-update Telnyx with the network's public IP address when it changes. | |
# Simply add a cron job to call it every minute or so. | |
# | |
# requirements: apt install curl dnsutils jq | |
# | |
API_KEY="{{ API_KEY_HERE }}" |
Inspired by an article about making free backups to the cloud and this one about automating the process with systemd, I decided to set up automatic backup over the internet of my mule laptop "lapdog".
It's an Arch Linux powered machine I mostly use to kill time, so it's not a big deal if for some reason I screw things up.
Something went wrong when I followed that guide, so I decided to retrace all the steps following restic
and aws
documentation instead of those articles.
And here is my version of the guide (hope it helps someone)
IBM COS basically let you create an Amazon S3 bucket with up to 25GB of cloud space to upload your backups for free! 😁
Too small for a full system backup, but enough fo
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 asyncio | |
from typing import AsyncGenerator, Dict | |
from fastapi import FastAPI | |
from nats.aio.client import Client as NATS | |
from nats.aio.client import Msg | |
from starlette.requests import Request | |
from starlette.responses import StreamingResponse | |
app = FastAPI() |
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 python:3.7-slim-stretch AS build | |
RUN \ | |
apt-get -q update \ | |
&& apt-get -q install -y --no-install-recommends \ | |
build-essential \ | |
libssl-dev \ | |
&& rm -rf /var/lib/apt/lists/* \ | |
&& pip install -U pip |
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
default['sshd']['sshd_config']['AuthenticationMethods'] = 'publickey,keyboard-interactive:pam' | |
default['sshd']['sshd_config']['ChallengeResponseAuthentication'] = 'yes' | |
default['sshd']['sshd_config']['PasswordAuthentication'] = 'no' |
NewerOlder