Install suggested plugin
- Folders Plugin
- OWASP Markup Formatter Plugin
- build timeout plugin
- Credentials Binding Plugin
- Timestamper Workspace Cleanup Plugin
- Ant Plugin Gradle Plugin
- Pipeline GitHub Organization
- Folder Plugin
# docker build -t drupal:d7adp72 -f d7adp72.Dockerfile . | |
# docker image tag drupal:d7adp72 .../drupal:d7adp72 | |
# docker push .../drupal:d7adp72 | |
FROM php:7.2-apache | |
# install the PHP extensions we need | |
RUN set -ex; \ | |
\ | |
if command -v a2enmod; then \ |
Install suggested plugin
Here's how to save and load docker images:
Example scenario: To save a docker image from a docker repository and save it as a tar file locally.
docker save repositoryname:tag > repotag.tar
#!/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= |
# Maintainer: Jakub Hajek, jakub.hajek@cometari.com | |
# | |
# docker stack deploy -c stack-elastic.yml elastic | |
# | |
# The stack creates Elasticsearch cluster consiting of | |
# - 3 dedicated master nodes in order to keep quorum | |
# - 4 dedicated data nodes to manage CRUD, | |
# - 2 coordination node acting like kind of load balancer in multi instance environments | |
# | |
# |
-- show running queries (pre 9.2) | |
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
FROM pg_stat_activity | |
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start desc; | |
-- show running queries (9.2) | |
SELECT pid, age(clock_timestamp(), query_start), usename, query | |
FROM pg_stat_activity | |
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
https://stackoverflow.com/a/1888569/11842937 | |
In MySQL: | |
SELECT * | |
FROM mytable | |
WHERE record_date >= NOW() - INTERVAL 1 DAY | |
In SQL Server: | |
SELECT * |
--- PSQL queries which also duplicated from https://github.com/anvk/AwesomePSQLList/blob/master/README.md | |
--- some of them taken from https://www.slideshare.net/alexeylesovsky/deep-dive-into-postgresql-statistics-54594192 | |
-- I'm not an expert in PSQL. Just a developer who is trying to accumulate useful stat queries which could potentially explain problems in your Postgres DB. | |
------------ | |
-- Basics -- | |
------------ | |
-- Get indexes of tables |
#!/bin/bash | |
# Send a simple mail from shell with this script | |
# Niko Heikkila 2012 | |
TO=$1 | |
SUBJECT=$2 | |
MSG=$3 | |
BODY=$HOME/message.tmp |
The Linux command line can be very powerful once you know how to use it. You can parse data, monitor processes, and do a lot of other useful and cool things using it. There often comes a need to generate a report and mail it out. It could be as simple a requirement as a notification that the day’s backup went through fine, or did not. I’ll help you get started with sending mails from the Linux command line and in shell scripts. We will also cover sending attachments from the command line. We will begin with the “mail” command. | |
First run a quick test to make sure the “sendmail” application is installed and working correctly. Execute the following command, replacing “you@youremailid.com” with your e-mail address. | |
# mail -s “Hello world” you@youremailid.com | |
Hit the return key and you will come to a new line. Enter the text “This is a test from my server”. Follow up the text by hitting the return key again. Then hit the key combination of Control+D to continue. The command prompt will ask you if you want |