Skip to content

Instantly share code, notes, and snippets.

@grasmash
grasmash / acsf-cm.md
Last active August 22, 2022 15:31
Configuration management best practices for ACSF.

This tutorial covers common use cases for configuration splits as a strategy for configuration management in Drupal 8.

Specifically it covers:

  • Default application configuration
  • Environment specific configuration (e.g., local, data, test, prod, etc.)
  • Site-specific configuration (when multisite is used)
  • "Feature" specific configuration (e.g. a distinct blog feature that is shared across multiple sites). Not to be confused with the features module.
  • Miscellaneous troubleshooting information
@coffeemug
coffeemug / gist:6168031
Last active October 15, 2024 01:08
The fun of implementing date support
After spending the better part of the month implementing date support
in RethinkDB, Mike Lucy sent the team the following e-mail. It would
have been funny, if it didn't cause thousands of programmers so much
pain. Read it, laugh, and weep!
-----
So, it turns out that we're only going to support dates between the
year 1400 and the year 10000 (inclusive), because that's what boost
supports.
<?php
$commands = drush_get_commands();
foreach ($commands as $name => $command) {
$output = theme_drush_command_docs($command);
file_put_contents("{$name}.md", $output);
}
function theme_drush_command_docs($command) {
@davereid
davereid / custom.admin_menu.inc
Last active June 17, 2025 13:10
Useful D7 custom functions
<?php
/**
* @file
* Administration menu integration for the custom module.
*/
/**
* Implements hook_admin_menu_cache_info().
*/
@msonnabaum
msonnabaum / drupal_issue_notify.rb
Created December 22, 2011 00:41
Script to notify you of new issues you're participating in via growl. Just pass it your drupal.org user id as the first arg.
#!/usr/bin/env ruby
require 'rubygems'
require 'rss/1.0'
require 'rss/2.0'
require 'zlib'
require 'open-uri'
require 'ruby_gntp'
require 'tempfile'
def store_dump(filename, obj)
@jrbeeman
jrbeeman / gist:1443446
Created December 7, 2011 16:24
My .emacs config, including a modified drupal-mode
This is out of date. See https://github.com/jrbeeman/emacs.d
<?php
/**
* Implementation of hook_drush_command().
*/
function code_sniffer_drush_command() {
$items['code-sniff'] = array(
'description' => '',
'arguments' => array(
'file' => "The file to run code-sniffer on.",
@jfexyz
jfexyz / .profile
Created March 10, 2011 18:44
Git Bash tools: Bash completion and shell prompt to list current branch/dirty status. Add this code to your .profile or .bash_profile or .bashrc.
##
# Bash completion scripts
##
if type brew > /dev/null 2>&1 && [ -f `brew --prefix`/etc/bash_completion ]; then
# Homebrew: http://mxcl.github.com/homebrew/
. `brew --prefix`/etc/bash_completion
fi
if [ -f /contrib/completion/git-completion.bash ]; then
@jfexyz
jfexyz / .gitconfig
Created March 10, 2011 18:43
Git Config: Rename this file ".gitconfig" and place inside your home directory.
##
# This file should be renamed ".gitconfig" and placed inside your home directory.
##
[user]
name = YOUR_NAME
email = YOUR_EMAIL
[github]
user = YOUR_GITHUB_USERNAME
token = YOUR_GITHUB_TOKEN