Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
TARGET_REMOTE="origin"
TARGET_BRANCH="master"
DEPLOY_DIR="_deploy"
# Store the last commit message.
LOG=$(git log --oneline -1)
# Re-generate the site
find . -type d -exec chmod 0755 {} \;
find . -type f -exec chmod 0644 {} \;
@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'],
];
@opdavies
opdavies / slackcheese.txt
Last active August 29, 2015 14:21
Slackcheese
#53B0EB,#0678BE,#96BC44,#FFFFFF,#E6FCB6,#FFFFFF,#96BC44,#F15340
#!/bin/bash
rm -rf output_dev/
sculpin generate --server --watch
{
"default_line_ending": "unix",
"ensure_newline_at_eof_on_save": true,
"fallback_encoding": "UTF-8",
"file_exclude_patterns":
[
"*.pyc",
"*.pyo",
"*.exe",
"*.dll",
<?php
$users = [
[ 'uid' => 21 ],
[ 'uid' => 22 ],
[ 'uid' => 23 ],
[ 'uid' => 24 ],
[ 'uid' => 25 ],
[ 'uid' => 26 ],
];
<?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();
<?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>
@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';