Skip to content

Instantly share code, notes, and snippets.

@clemlesne
clemlesne / wipe-timestream.sh
Last active Aug 2, 2021
Wipe AWS Timestream database plus tables
View wipe-timestream.sh
#!/bin/sh
#
# Wipe all tables contained into a AWS Timestream database.
# Usage: wipe-timestream.sh -d [my-db]
#
# TODO: Iterate through the AWS pagination for getting more than 20 tables per script exec
#
usage() {
@clemlesne
clemlesne / pod-dummy.yaml
Created May 20, 2021
Dommy Kubernetes pod
View pod-dummy.yaml
apiVersion: v1
kind: Pod
metadata:
name: dummy
labels:
env: test
spec:
containers:
- name: dummy
image: busybox
@clemlesne
clemlesne / gist:804e26c1ff06184dc04328b39b20cc87
Created Dec 19, 2017
Change root password with MariaDB
View gist:804e26c1ff06184dc04328b39b20cc87
To begin, stop the database service and check the service status:
------------- SystemD -------------
# systemctl stop mariadb
------------- SysVinit -------------
# /etc/init.d/mysqld stop
Next, start the service with --skip-grant-tables:
------------- SystemD -------------
@clemlesne
clemlesne / tips.md
Last active Mar 19, 2019
Proper permissions for web server's directory
View tips.md

First, fix the owners :

sudo chgrp -R www-data .

Then, fix the access permissions :

For read-only folders :

sudo find . -type f -exec chmod 0460 {} \;