Skip to content

Instantly share code, notes, and snippets.

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

Aurelien Navarre anavarre

🏠
Working from home
View GitHub Profile
@jchatard
jchatard / countries.iso-3166-1.inc.php
Created December 14, 2011 09:59
ISO-3166-1 (ALPHA 2) countries list in french
<?php
/**
* Country list ISO-3166-1 (ALPHA 2) in french
*/
function countries() {
$countries = array(
'AF' => 'Afghanistan',
'ZA' => 'Afrique Du Sud',
'AX' => 'Åland, Îles',
@webbj74
webbj74 / drupal-quick-dump.sh
Last active October 29, 2023 10:10
Script to dump Drupal database structure, but exclude data from massive/unneeded tables.
#!/bin/bash
# usage: drupal-quick-dump user host database
USER="$1"
HOST="$2"
DB="$3"
DATE=`date +%Y%m%d`
# Get User Password
echo "Please provide the password for ${USER} on db ${DB} hosted at ${HOST}:"
@timmillwood
timmillwood / drupal-quick-dump.sh
Last active October 28, 2019 07:49 — forked from webbj74/drupal-quick-dump.sh
Script to dump Drupal database structure, but exclude data from massive/unneeded tables.
#!/bin/bash
# usage: drupal-quick-dump user host database
USER="$1"
HOST="$2"
DB="$3"
DATE=`date +%Y%m%d`
# Get User Password
echo "Please provide the password for ${USER} on db ${DB} hosted at ${HOST}:"
@webchick
webchick / drupal-hooks-by-implementation
Last active April 9, 2020 10:00
A list of hooks in all* Drupal contrib modules (6.x and 7.x), in descending order of how often they're implemented. (Consolidated a few that were renamed between 6 and 7) * Within a rounding error. :P
Array
(
[hook_menu] => 6744
[hook_uninstall] => 4742
[hook_perm(ission)] => 4012
[hook_install] => 3751
[hook_theme] => 3525
[hook_schema] => 3003
[hook_help] => 2465
[hook_form_alter] => 2273
@yched
yched / D8 dump script
Last active December 27, 2015 18:28
D8 dump/restore scripts - relies on Drush (which is currently broken on D8)
#!/bin/bash
# TO CONFIGURE
DRUSH='/usr/local/bin/drush'
DUMP_SUBFOLDER='dumps'
DUMP_NAME=$1
DRUPAL_ROOT=`$DRUSH st drupal_root --format=list`
DRUPAL_CONFIG=`$DRUSH st active_config_directory_path --format=list`
DUMP_DIR="$DRUPAL_ROOT/$DUMP_SUBFOLDER/$DUMP_NAME"
@pascalpoitras
pascalpoitras / config.md
Last active July 18, 2024 22:34
My WeeChat configuration

WeeChat Screenshot

Mouse


enable


@addyosmani
addyosmani / README.md
Last active July 13, 2024 21:26 — 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

@imjasonh
imjasonh / markdown.css
Last active May 24, 2024 22:56
Render Markdown as unrendered Markdown (see http://jsbin.com/huwosomawo)
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
}
@mariagwyn
mariagwyn / Drupal 8 Composer Example
Created October 10, 2016 21:27
Composer build file for a Drupal 8 site
{
"name": "Drupal 8 Composer Build",
"description": "Project json for a Drupal 8 sites",
"type": "project",
"require": {
"composer/installers": "^1.0.20",
"drupal-composer/drupal-scaffold": "^2.0.0",
"cweagans/composer-patches": "^1.5.0",
"drupal/core": "~8",
"drupal/lightning": "~8.1",