Skip to content

Instantly share code, notes, and snippets.

@scottalan
scottalan / script.sh
Last active December 24, 2015 12:59
script
#!/bin/bash
# Variables
rand=$RANDOM
web_user=$USER
prefix=DB_
# My ENV variable is: DB_scotttest=scott-cedistage_13250
# Let's say [ ${1} -e 'test' ]
@scottalan
scottalan / gist:8341408
Last active January 2, 2016 18:09
Open Atrium - drush site-install
WD php: Notice: Undefined index: fieldable in backports_menu_alter() (line 14 of /home/scott/public/oa/www/profiles/openatrium/modules/contrib/backports/backports.module). [20.37 sec, 50.69 [notice]
MB]
WD php: Notice: Undefined index: label in entity_views_table_definition() (line 147 of /home/scott/public/oa/www/profiles/openatrium/modules/contrib/entity/views/entity.views.inc). [20.43 [notice]
sec, 54.88 MB]
WD php: Notice: Undefined index: controller class in entity_type_supports() (line 84 of /home/scott/public/oa/www/profiles/openatrium/modules/contrib/entity/entity.module). [20.43 sec, [notice]
54.89 MB]
WD php: Warning: class_implements(): object or string expected in entity_type_supports() (line 84 of /home/scott/public/oa/www/profiles/openatrium/modules/contrib/entity/entity.module). [warning]
[20.43 sec, 54.89 MB]
WD php: Warning: in_array() expects parameter 2 to be array, boolean given in entity_type_supports() (line 84 of
@scottalan
scottalan / oa.md
Last active January 2, 2016 21:39
OpenAtrium clean install

This was a wget/tar of of the latest and I installed it using the UI, not drush.

The specified file temporary://file9Zmhdj could not be copied, because the destination directory is not properly configured. This may be caused by a problem [error] with file or directory permissions. More information is available in the system log.

The results of drush fd. This is out of the box, before drush fra -y.

 Name                                          Feature                        Status    Version               State
 Command Buttons                               command_buttons                Enabled   7.x-1.0-beta1         Overridden
@scottalan
scottalan / example.js
Created January 28, 2014 06:44
Gruntfile
// Renames files for browser caching purposes
rev: {
dist: {
files: {
src: [
'<%= yeoman.dist %>/scripts/{,*/}*.js',
'<%= yeoman.dist %>/styles/{,*/}*.css',
'<%= yeoman.dist %>/images/{,*/}*.{png,jpg,jpeg,gif,webp,svg}',
'<%= yeoman.dist %>/styles/fonts/*'
]

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta charset='UTF-8'>
<meta name='keywords' content='your, tags'>
<meta name='description' content='150 words'>
<meta name='subject' content='your website's subject'>
<meta name='copyright' content='company name'>
@scottalan
scottalan / perms.md
Last active August 29, 2015 13:55
Drupal file permissions

For this I added my user to the www-data group: sudo usermod -a -g www-data your_user

I also changed the umask for my user in ~/.profile: umask 027

Change user:group for entire file system: sudo chown -R your_user:www-data drupal_root

On Drupal root run:

@scottalan
scottalan / features.diff
Last active August 29, 2015 13:56
A Drush diff of 'oa_panopoly_users' and 'panopoly_users'.
OA Panopoly Users
Component type: info
features[features_overrides][] = panelizer_defaults.user:user:default.display|panels|column1
features[features_overrides][] = panelizer_defaults.user:user:default.display|panels|column2
- features[features_overrides][] = panelizer_defaults.user:user:default.display|panels|contentheader
features[features_overrides][] = panelizer_defaults.user:user:default.display|panels|sidebar
features[features_overrides][] = panelizer_defaults.user:user:default.display|uuid
@scottalan
scottalan / gist:9335285
Created March 3, 2014 21:45
oa_worktracker, oa_panopoly_users, panopoly_users - Issues with overriding features.
<?php
// If OA Worktracker adds 'new-7e2787f8-3f6c-4b3b-a1bb-e11225e395d5' to the array of
// '$data['user:user:default']->display->panels['contentheader']' then it's in a good state.
// NOTE: I am just adding these changes manually.
/**
* Implements hook_panelizer_defaults_override_alter().
@scottalan
scottalan / features.php
Created March 6, 2014 19:37
The order of panes in a region as it relates to features.
<?php
//This is the default order exported to the oa_panopoly_users.features.inc file:
$data['user:user:default']->display->panels['contentheader'] = array(
0 => 'new-d3a2a9fb-f88a-4730-bfab-c36f4e0af395',
1 => 'new-faf0ad46-b575-4f96-874d-9a4548cc8da3',
2 => 'new-a617e554-6ad7-4d25-9d89-627d130d8be3',
);
// This is what features wants to see as far as determining whether there is a diff or not.
# ~/.profile: executed by the command interpreter for login shells.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# exists.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.
# the default umask is set in /etc/profile; for setting the umask
# for ssh logins, install and configure the libpam-umask package.
#umask 022