Skip to content

Instantly share code, notes, and snippets.

# How to force disable interface translation by overriding the locale lookup service to not be added to the translation manager
# settings.local.php:
$settings['container_yamls'][] = DRUPAL_ROOT . '/sites/default/services.local.yml';
# services.local.yml (add this file to .gitignore):
services:
string_translator.locale.lookup:
class: Drupal\locale\LocaleTranslation
@larowlan
larowlan / twidc-commits.sh
Created July 17, 2014 22:45
Provides core commits in twidc format
git log --since "1 week ago" --oneline|gsed -r 's|#([0-9]+)|<a href="http://drupal.org/node/\1">Issue \1</a>|'|gsed -r 's|^((.*) Issue )|<li>|;s|$|</li>|'
@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
@mparker17
mparker17 / config
Last active February 21, 2024 01:26
$XDG_CONFIG_HOME/git
[alias]
fml = reset --hard HEAD
hist = log --pretty=format:\"%C(cyan)%h %C(green)%ad%Creset | %s %C(yellow)%d %C(magenta)[%an]\" --graph --date=short
s = status
st = status
sta = status
stat = status
statu = status
stats = status
unstage = rm --cached -r