Skip to content

Instantly share code, notes, and snippets.

@opdavies
opdavies / with-options.sh
Last active May 14, 2016 19:43
Use the Drupal VM Generator
drupalvm config:generate \
--hostname=example.com \
--machine-name=example \
--ip-address=192.168.88.88 \
--cpus=1 \
--memory=512 \
--webserver=nginx \
--path=../site \
--destination=/var/www/site \
--docroot=/var/www/site/drupal \
@opdavies
opdavies / download-the-phar.sh
Last active March 21, 2016 06:55
Install the Drupal VM Generator.
curl -s https://www.drupalvmgenerator.com/download -L -o drupalvm-generate.phar
@opdavies
opdavies / settings.php
Last active January 16, 2016 18:09
Drupal 8 settings.
<?php
$settings['hash_salt'] = '';
$settings['update_free_access'] = FALSE;
$settings['container_yamls'][] = __DIR__ . '/services.yml';
if (file_exists(__DIR__ . '/settings.local.php')) {
include __DIR__ . '/settings.local.php';
<?xml version="1.0" encoding="UTF-8" ?>
<node_export created="Tue, 01 Dec 2015 20:11:46 +0000">
<node>
<vid>1</vid>
<uid>1</uid>
<title>Comis Duis Jumentum Nostrud Vereor</title>
<log></log>
<status>1</status>
<comment>2</comment>
<promote>1</promote>
<?php
use Symfony\Component\Finder\Finder;
/**
* Implements hook_views_default_views().
*/
function MYMODULE_views_default_views() {
// Find all .view.inc files in a the views/ directory, and include them.
$finder = new Finder();
<?php
$users = [
[ 'uid' => 21 ],
[ 'uid' => 22 ],
[ 'uid' => 23 ],
[ 'uid' => 24 ],
[ 'uid' => 25 ],
[ 'uid' => 26 ],
];
{
"default_line_ending": "unix",
"ensure_newline_at_eof_on_save": true,
"fallback_encoding": "UTF-8",
"file_exclude_patterns":
[
"*.pyc",
"*.pyo",
"*.exe",
"*.dll",
#!/bin/bash
rm -rf output_dev/
sculpin generate --server --watch
@opdavies
opdavies / slackcheese.txt
Last active August 29, 2015 14:21
Slackcheese
#53B0EB,#0678BE,#96BC44,#FFFFFF,#E6FCB6,#FFFFFF,#96BC44,#F15340
@opdavies
opdavies / example.local.settings.php
Last active January 24, 2017 23:36
A base settings.php for Drupal 7.
<?php
$databases['default']['default'] = [
'driver' => $_ENV['DB_CONNECTION'],
'host' => $_ENV['DB_HOST'],
'port' => $_ENV['DB_PORT'],
'database' => $_ENV['DB_NAME'],
'username' => $_ENV['DB_USER'],
'password' => $_ENV['DB_PASS'],
];