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 / drupal7_rich_fields_report.sh
Last active February 28, 2023 11:36
Find Drupal 7.x rich texts (HTML) tags and shortcodes.
#!/bin/bash -e
# Prevent errors in a pipeline from being masked
set -o pipefail
set -e
# A script that generates a simple txt report for all the rich texts (that allow HTML value) on a Drupal 7.x project.
# The report is searching inside each field for special HTML tags or shortcodes.
# The script is useful for Migration processes as also as for a general overview of the HTML tags found inside fields.
# Requires drush 8.x, php. Can also work with ddev.
@theodorosploumis
theodorosploumis / git_ui.md
Created February 18, 2023 14:10
Needs for an online git UI (GitHub etc)

Git online GUI

  • Online access
  • User roles and permissions
  • Code display and formatter
  • Link to code/line of.
  • Pull Requests
  • Collaboration on code and issues
  • CI/CD automation
  • Git tags and versions
@theodorosploumis
theodorosploumis / Spam_list.txt
Created April 21, 2020 15:26
Spam tld list 2020
*.abbott
*.abogado
*.abudhabi
*.ac
*.academy
*.accountant
*.accountants
*.aco
*.actor
*.ad
@theodorosploumis
theodorosploumis / drupal_8_list_software.sh
Last active October 22, 2022 09:32
Get lists of software etc used on a Drupal 8.x site (modules, themes, 3rd party libraries, drupal libraries)
// Get lists of software etc used on a Drupal 8.x site
// Get drupal projects
drush pml --status="enabled"
// Get non core Drupal projects installed
drush pml --status="enabled" --no-core --format="table"
// Get php party libraries
composer show -i
@theodorosploumis
theodorosploumis / gizra_task_pricing.md
Last active August 17, 2022 10:02
The Gizra way pricing method

Basic rules

A simple pricing estimation method to avoid cost and time pitfalls. See more at http://www.gizra.com/content/budget-goggles/.

  • Everyone should understand the "pricing" table (simple naming etc)
  • Split the project to undestandable taks
  • Set max of 12hr for a task (more hr cannot be accurate)
  • Setup a human language for the tasks
  • Create group of tasks with a visible result (eg a webpage, a complete functionality etc)
  • Write zero prices for almost zero time tasks (eg a Drupal login)
  • With Drupal we can split tasks and estimate time is easier because of the architecture of the CMS (menu, entities, fields etc)
@theodorosploumis
theodorosploumis / Install_Phpstorm.sh
Last active June 16, 2022 11:15
Update phpstorm on Ubuntu linux.
#!/bin/bash -e
# IMPORTANT. My phpstom installation exists on /opt/phpstorm.
# Early Access program: https://confluence.jetbrains.com/display/PhpStorm/PhpStorm+Early+Access+Program
# For stable releases try: https://data.services.jetbrains.com/products/download?code=PS&platform=linux
if [ "$(whoami)" != "root" ]
then
echo "Sorry, you are not root."
exit 1
fi
@theodorosploumis
theodorosploumis / HTMLToReact.tsx
Created May 12, 2022 21:26 — forked from natterstefan/HTMLToReact.tsx
html-react-parser | TypeScript solution
/**
* Works in Next.js 10.x
*/
import React from 'react'
import parse, {
domToReact,
attributesToProps,
Element,
HTMLReactParserOptions,
} from 'html-react-parser'
@theodorosploumis
theodorosploumis / ansible_commands.txt
Last active May 5, 2022 15:32
Simple Ansible ad-hoc commands for Shared Hosting
// Inventory name is "hosts"
// Example of inventory
[group]
SERVER_NAME ansible_connection=ssh ansible_ssh_user=SSH_USER ansible_python_interpreter=PATH_TO_REMOTE
_PYTHON
// List hosts
ansible -i hosts all --list-hosts
// Show info for each host
ansible -i hosts all -m setup