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
@JamesMGreene
JamesMGreene / gitflow-breakdown.md
Last active September 1, 2025 09:14
`git flow` vs. `git`: A comparison of using `git flow` commands versus raw `git` commands.

Initialize

gitflow git
git flow init git init
  git commit --allow-empty -m "Initial commit"
  git checkout -b develop master

Connect to the remote repository

@staltz
staltz / introrx.md
Last active September 6, 2025 13:00
The introduction to Reactive Programming you've been missing
@RadGH
RadGH / phone-number.php
Last active May 31, 2023 08:00
Convert user-inputted phone number to consistently formatted HTML link, with extension support
<?php
// improved version: https://gist.github.com/RadGH/31f16cd4705a2d8076021a9ad528f34f
// ----------
// Example #1: HTML
$phone_number = '555.123.4567';
echo format_phone( $phone_number );
@anthonysterling
anthonysterling / Vagrantfile
Last active April 29, 2020 15:28
Handy Vagrantfile for IE testing with Vagrant.
# 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",
@addyosmani
addyosmani / README.md
Last active August 24, 2025 14:34 — forked from 140bytes/LICENSE.txt
108 byte CSS Layout Debugger

CSS Layout Debugger

A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.

One-line version to paste in your DevTools

Use $$ if your browser aliases it:

~ 108 byte version

@dickolsson
dickolsson / drupal-provisioner
Last active June 8, 2017 15:55
Provisioning script for a simple PHP/Drupal development environment
#!/bin/bash
#
# Configure your IDE to listen to connections with these settings:
#
# * Max simultaneous connections: 3
# * Xdebug port: 9001
# * DBGp host: <blank>
# * DBGp port: 9001
# * IDE key: MYIDE
#
@Greg-Boggs
Greg-Boggs / README.md
Last active August 30, 2023 10:09
Drupal Site Building Best Practices

Better Drupal Building

  • Custom glue should be accomplished with configuration first and PHP code second.

Configuration Management and Dependencies

  • Use Composer (or Drush Make) to build your project and it's depencies.
  • Store your work in files.
  • Set your config directory above the webroot.
  • Sync UUIDs across all developers.

Theming

@ggtools
ggtools / countContainers.sh
Created November 17, 2014 13:27
A simple script to count the containers on a Docker host.
#!/bin/bash
function countContainers() {
docker ps -q $1 | wc -l
}
function countCrashedContainers() {
docker ps -a | grep -v -F 'Exited (0)' | grep -c -F 'Exited ('
}
@BBGuy
BBGuy / dc_emw.php
Last active November 16, 2022 14:08
Working with Drupal commerce entities using entity_metadata_wrapper. Just a bunch of exampled copied from the web or added by me. will keep adding over time. now more then just commerce entities
<?php
// Basics
// Get a value.
$value = $wrapper->field_x->value();
// If the field is a reference field you will get the field object
// To get the wrapper back use:
$wrapper_b = $wrapper->field_ref;
// To set a value.
@sethfischer
sethfischer / .gitattributes
Created February 19, 2015 07:09
Drupal 8 .gitattributes export-ignore template
# Files to exclude when creating archive
## General
*.git export-ignore
*.gitignore export-ignore
*.gitattributes export-ignore
*README.* export-ignore
*readme.* export-ignore