Skip to content

Instantly share code, notes, and snippets.

View theodorosploumis's full-sized avatar
🏠
Working from home

Theodoros Ploumis theodorosploumis

🏠
Working from home
View GitHub Profile
@theodorosploumis
theodorosploumis / software.sh
Created May 27, 2016 00:41
Print versions of software installed. Useful for README.txt, CHANGELOG.txt etc. Mainly for Drupal.
#!/usr/bin/env bash
# Print versions of installed software
# bash /scripts/software.sh >> /SOFTWARE.txt
# Print distribution info
echo -e "-----------------------------------\n"
echo -e "$(uname -a)"
echo -e "---------------------------------- \n"
# Print date created
@theodorosploumis
theodorosploumis / crontab_script.sh
Last active April 10, 2020 10:36 — forked from dcrystalj/startup.bat
Setup Cron jobs with crontab for Drupal 7.x and 8.x (also how to clear caches, flush image styles etc)
# Open crontab with nano
# env EDITOR=nano crontab -e
# Examples from https://crontab.guru
# 0 03 * * 1-5
# */15 * * * *
# 33 * * * *
0 03 * * 1-5 /usr/local/bin/curl "http://www.domain.com/cron.php?cron_key=vHhbh21L3NXkiF5wKb5QXg3EHCp1ODDvN5DM0gH9OzO" > /dev/null 2>&1
@theodorosploumis
theodorosploumis / install_php.sh
Last active November 29, 2019 11:05
Install php7 with useful extension on Ubuntu xenial 16.10
sudo apt-get purge php5-common -y
#sudo apt-get install php7.0 php7.0-fpm php7.0-mysql -y
sudo apt-get install -y \
php \
libapache2-mod-php \
php-fpm \
php-mysql \
php-memcached \
php-pear \
@theodorosploumis
theodorosploumis / Football_Rules.md
Last active October 16, 2019 20:33
Football Rules

Κανόνες παιχνιδιού κεντρικού παίκτη (midfielder)

  1. Πρέπει ανά πάσα στιγμή να ελέγχει όλο το γήπεδο (γρήγορες ματιές) και να ξέρει που είναι όλοι οι συμπαίκτες και οι αντίπαλοι.
  2. Είναι υπεύθυνος για τον ρυθμό του παιχνιδιού και την συμμετοχή όλων των παικτών στο παιχνίδι (αλλαγές παιχνιδιού, δημιουργα υπεραριθμίας κτλ).
  3. Απλό παιχνίδι (μέγιστο 2 κοντρόλ).
  4. Καλές τοποθετήσεις στον κατάλληλο (κενό) χώρο.
  5. Οι πάσεις του πρέπει να έχουν όσο το δυνατόν καλύτερη ακρίβεια.
  6. Όταν παίρνει την μπάλα με την πλάτη να την επιστρέφει σχεδόν πάντα πίσω.
  7. Οι πάσες προς τα πίσω να είναι 100% σωστές.
  8. Όταν έχει κοντά αντίπαλο δίνει άμεσα πάσα.
@theodorosploumis
theodorosploumis / composer_commands.txt
Last active August 5, 2019 07:58
Composer commands list
composer outdated -Dm
composer prohibits vendor/package version
composer show vendor/package
composer show vendor/package -a
composer depends vendor/package -t
composer outdated -m
composer outdated
composer update vendor/package --with-dependencies --dry-run
composer require vendor/package:constraint --no-update
composer update vendor/package vendor/package vendor/package
@theodorosploumis
theodorosploumis / Vagrantfile
Last active February 18, 2019 10:36 — forked from anthonysterling/Vagrantfile
Windows IE Vagrantfile
# Usage: IE={box} vagrant up
#
# Eg. IE=XPIE6 vagrant up
boxes = {
"XPIE6" => "http://aka.ms/vagrant-xp-ie6",
"XPIE8" => "http://aka.ms/vagrant-xp-ie8",
"VistaIE7" => "http://aka.ms/vagrant-vista-ie7",
"Win7IE8" => "http://aka.ms/vagrant-win7-ie8",
"Win7IE9" => "http://aka.ms/vagrant-win7-ie9",
@theodorosploumis
theodorosploumis / Cretaforce_move_Drupal_site.md
Last active February 15, 2019 21:46
How to move a Drupal site from Server A to Server B

How to move a Drupal site from Server A to Server B.

  1. Create the Domain on Server B
  2. Create the Emails on Server B
  3. Create the Database on Server B
  4. Download the database from Server A using backup_migrate
  5. Rsync files from Server A to Server B using ssh. Be careful to also transfer the dotfiles (or use git if is set)
  6. Install drush on Server B (see drush-installer)
  7. Install Drupal on Server B with a clean Database
  8. Enable module backup_migrate on the new site on Server B
@theodorosploumis
theodorosploumis / devops_for_drupal.md
Created February 15, 2019 21:24
Devops for Drupal
  • Dev/Stage/Live environment
  • Software for issues (eg Jira, GitHub etc)
  • Security monitoring
  • Git precommit hooks
  • Git hosting (eg Gitlab, GitHub, Bitbucket)
  • CI (eg CircleCI)
  • Development tools (eg performance, build etc)
  • Collaboration tools (eg Slack)
  • Drupal specific hosting (Acquia, Pantheon, Amazee etc)
  • Drush custom commands
### Keybase proof
I hereby claim:
* I am theodorosploumis on github.
* I am theodorosploumis (https://keybase.io/theodorosploumis) on keybase.
* I have a public key whose fingerprint is 12F8 43E2 FE78 653C 6C93 B925 6F21 831E 78DB 885B
To claim this, I am signing this object:
@theodorosploumis
theodorosploumis / drupal-quick-dump.sh
Last active March 22, 2016 13:21 — forked from kyleskrinak/drupal-quick-dump.sh
Database dump for Drupal. Use "drupal-quick-dump <db_user> <db_host> <database_name> D8"
#!/bin/bash
# usage: drupal-quick-dump user host database D8 ("D8" is optional)
# remember to chmod u+x drupal-quick-dump.sh
BOLD="$(tput bold)"
RED="$(tput setaf 1)"
GREEN="$(tput setaf 2)"
MAG="$(tput setaf 5)"
RESET="$(tput sgr0)"
USER="$1"