Create a new Role from a Policy with the following permissions:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
#!/bin/bash | |
# Written 2018-11-15 by 4410287 | |
# This script will create a backup file of a postgres database and compress it. It is capable of access a local or remote server to pull the backup. After creating a new backup, it will delete backups that are older than 15 days, with the exception of backups created the first of every month. It is recommended to create a seperate database user specifically for backup purposes, and to set the permissions of this script to prevent access to the login details. Backup scripts for different databases should be run in seperate folders or they will overwrite each other. | |
HOSTNAME= | |
USERNAME= | |
PASSWORD= | |
DATABASE= |
(This is a translation of the original article in Japanese by moratorium08.)
(UPDATE (22/3/2019): Added some corrections provided by the original author.)
Writing your own OS to run on a handmade CPU is a pretty ambitious project, but I've managed to get it working pretty well so I'm going to write some notes about how I did it.
# AWS SSM Agent RPi Installation | |
# First get an SSM agent activate code | |
# - Login to the AWS web console and browse to the AWS Systems Manager service (SSM). | |
# - Under Instances & Nodes, select Hybrid Activations | |
# - Select 'Create activation', fill-out the form and get an activation code | |
# Login to your server via SSH and run the following commans, entering the code, id and region values | |
mkdir /tmp/ssm | |
sudo curl https://s3.amazonaws.com/ec2-downloads-windows/SSMAgent/latest/debian_arm/amazon-ssm-agent.deb -o /tmp/ssm/amazon-ssm-agent.deb |
Spring Boot makes database migration with Flyway or Liquibase almost effortless - but by default it will use the
spring.datasource.*
credentials when running the migrations, which kinda suggests that this user should have
ALL PRIVILEGES
on the schema. This is risky, because... well if you find this page, you probably familiar
with poor little Bobby Tables
.
Spring Boot also makes it possible to configure separate credentials for running database migrations with the
spring.flyway.*
or spring.liquibase.*
properties.
I prefer app credetials this way: an app owner
with ALL PRIVILEGES
to run the migrations and an app user
with least privileges, mostly CRUD
or some limited EXECUTE
for the app itself.
{ pkgs ? import <nixpkgs> {}, unstable ? import <nixos-unstable> {} }: | |
let | |
binutils = unstable.binutils; # need binutils >=2.39 for DWARF5 debuginfo | |
llvmPackages_14 = unstable.llvmPackages_14; | |
sphinx = unstable.sphinx; # need sphinx >=5.x.x due to https://github.com/sphinx-doc/sphinx/issues/10495 | |
in | |
pkgs.mkShell { | |
SPHINXBUILD = "${pkgs.sphinx}/bin/sphinx-build"; |