Skip to content

Instantly share code, notes, and snippets.

@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
[[ -s "$HOME/.profile" ]] && source "$HOME/.profile" # Load the default .profile
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# don't put duplicate lines in the history. See bash(1) for more options
# ... or force ignoredups and ignorespace
HISTCONTROL=ignoredups:ignorespace
# bash/zsh git prompt support
#
# Copyright (C) 2006,2007 Shawn O. Pearce <spearce@spearce.org>
# Distributed under the GNU General Public License, version 2.0.
#
# This script allows you to see the current branch in your prompt.
#
# To enable:
#
# 1) Copy this file to somewhere (e.g. ~/.git-prompt.sh).
$(".flex-grid").find("img").each(function () {
this.width = (this.width + 10);
});