- Install library:
pip install ipdb
- Add line info .py before control step:
import ipdb; ipdb.set_trace()
#!/usr/bin/env bash | |
# empty log file: echo "" > $(docker inspect --format='{{.LogPath}}' <container_name_or_id>) | |
# apply: wget -O - https://goo.gl/x86FN9 | sudo bash | |
FILEPATH=/etc/docker/daemon.json | |
cat << EOF > $FILEPATH | |
{ | |
"log-driver": "json-file", |
#!/usr/bin/env bash | |
export SOURCE_FOLDER=/tmp | |
export DESTINATION_FOLDER=tmp | |
export BUCKET=backup_bucket | |
#echo "lalalalalala" > /tmp/lala.txt | |
# Service Account role: roles/storage.objectAdmin = Storage Object Admin | |
export KEY=Service_Account.json | |
export NEWUSER=mybackup |
FROM alpine:latest | |
RUN apk add --no-cache netcat-openbsd | |
ENTRYPOINT [ "nc" ] | |
# usage... | |
# build: docker build -t netcat:latest . | |
# server: docker run --rm -p <hostPort>:<containerPort> netcat:latest -l <port> | |
# client: docker run --rm netcat:latest <hostname> <remotePort> | |
FROM ruby:2.4.4-jessie | |
LABEL maintainer="Carles San Agustin" | |
WORKDIR / | |
RUN echo 'source "https://rubygems.org"\n \ | |
gem "test-kitchen"\n \ | |
gem "kitchen-docker"\n \ | |
gem "kitchen-ansible"\n \ | |
gem "net-ssh"\n \ |
# place a copy of the service account key next to this file and rename <gcp_service_account_key> | |
# build: docker build -t gcloud . | |
FROM ubuntu:18.04 | |
COPY ./<gcp_service_account_key>.json /saccount_key.json | |
ENV private_key=/saccount_key.json | |
# install required packages | |
RUN apt-get update && apt-get install -y lsb-core curl ssh jq && \ | |
export CLOUD_SDK_REPO="cloud-sdk-$(lsb_release -c -s)" && \ |
pip install ipdb
import ipdb; ipdb.set_trace()
└── basic_project
├── config.yml
├── inventory
# Show users | |
SELECT User, Host, Password FROM mysql.user; | |
# Create backup user | |
GRANT ALL PRIVILEGES ON *.* TO `backup`@`localhost` IDENTIFIED BY 'backup_password'; |
<?php | |
/** | |
* Generate a list of Status Cake Ip addresses | |
* To add allowed IPs to Nginx or Firewall | |
* from: https://www.statuscake.com/kb/knowledge-base/what-are-your-ips/ | |
*/ | |
$statuscake_locations_json = "https://app.statuscake.com/Workfloor/Locations.php?format=json"; | |
$locations = json_decode(file_get_contents($statuscake_locations_json)); | |
$output = "#STATUS CAKE IPs" . "\n"; |