Skip to content

Instantly share code, notes, and snippets.

@MrTrustor
MrTrustor / change_billing_account.sh
Last active September 17, 2019 12:01
A script to batch change the billing account of GCP projects: https://blog.mrtrustor.net/post/massive-gcp-billing-change/
#!/bin/bash
# Copyright 2019 Théo Chamley
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# Check docker install
docker version
# check docker first run hello world
docker run hello-world
# Répertoire de travail
mkdir demo && cd demo
# hello.php
@MrTrustor
MrTrustor / backup.sh
Created January 3, 2017 14:22
Simple backup with Duplicity and AWS Glacier
#!/bin/bash
# Copyright 2017 Théo Chamley
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in the Software
# without restriction, including without limitation the rights to use, copy, modify, merge,
# publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
# to whom the Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all copies or

Keybase proof

I hereby claim:

  • I am MrTrustor on github.
  • I am mrtrustor (https://keybase.io/mrtrustor) on keybase.
  • I have a public key whose fingerprint is EBF1 737F 11E8 5E6D 81CC 631E 235F 766B 0321 525F

To claim this, I am signing this object:

@MrTrustor
MrTrustor / clean-docker-for-mac.sh
Last active November 21, 2023 11:38
This script cleans the Docker.qcow2 file that takes a lot of disk space with Docker For Mac. You can specify some Docker images that you would like to keep.
#!/bin/bash
# Copyright 2017 Théo Chamley
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in the Software
# without restriction, including without limitation the rights to use, copy, modify, merge,
# publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
# to whom the Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all copies or
@MrTrustor
MrTrustor / policy.json
Created September 16, 2016 18:08
IAM policy that provides full access to AWS services and resources except IAM, CloudTrail and CloudTrail logs
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"NotAction": [
"iam:*",
"cloudtrail:*"
],
"Resource": "*"