Skip to content

Instantly share code, notes, and snippets.

View lrobeson's full-sized avatar

Laura Robeson lrobeson

View GitHub Profile
@lrobeson
lrobeson / gist:6142121
Last active December 20, 2015 13:49
Bash alias for post Drupal installation to set permissions and remove unnecessary files
# Remove write permissions from settings.php and remove unnecessary files per Drupal.org instructions
# (https://drupal.org/upgrade/finished). The file removal part isn't really a great security measure,
# but helpful if you prefer a clean directory.
alias drupal-post-install-cleanup="chmod a-w sites/default/settings.php && rm CHANGELOG.txt COPYRIGHT.txt install.php INSTALL.mysql.txt INSTALL.pgsql.txt INSTALL.sqlite.txt INSTALL.txt LICENSE.txt MAINTAINERS.txt UPGRADE.txt"
@lrobeson
lrobeson / gist:6142193
Last active December 20, 2015 13:49
Bash alias to initialize a new Git repo, add all files, and do initial commit
alias create-git-repo="git init && git add . && git commit -m \"initial commit\""
@lrobeson
lrobeson / gist:6456240
Created September 5, 2013 21:12
Set useful Drupal development environment variables in settings.php
/*
Set some useful development environment variables
*/
# change site name
$conf['site_name'] = 'SITENAME LOCAL';
# turn off caching & aggregation
$conf['cache'] = FALSE;
$conf['block_cache'] = FALSE;
@lrobeson
lrobeson / gist:6456372
Last active December 22, 2015 10:08
Bash alias to prepare a cloned Drupal 7 site that doesn't include files directory or settings.php
# create settings.php, file directories, set permissions, and return to site root
alias prepare-d7-site="cd sites/default && cp default.settings.php settings.php && chmod a+w settings.php && mkdir files && chmod a+w files && mkdir private && mkdir tmp && chmod a+w private && chmod a+w tmp && cd .. && cd .."
@lrobeson
lrobeson / .editorconfig
Created September 16, 2013 19:25
Default EditorConfig file
# EditorConfig is awesome: http://EditorConfig.org
# top-most EditorConfig file
root = true
# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true
@lrobeson
lrobeson / .bash_profile
Created September 17, 2013 18:27
Bash profile for local Drupal development
#########################
# Drupal install commands
# Drupal 7 - add .htaccess, settings.php, file directories, set permissions, and return to site root
alias prepare-d7-site="cp ../drupal7/.htaccess .htaccess && cd sites/default && cp default.settings.php settings.php && chmod a+w settings.php && mkdir files && chmod a+w files && mkdir private && mkdir tmp && chmod a+w private && chmod a+w tmp && cd .. && cd .."
# Drupal 8 - add .htaccess, settings.php, file directories, set permissions, and return to site root
alias prepare-d8-site="cp ../drupal8/.htaccess .htaccess && cd sites/default && cp default.settings.php settings.php && chmod a+w settings.php && mkdir files && chmod a+w files && mkdir private && mkdir tmp && chmod a+w private && chmod a+w tmp && cd .. && cd .."
# remove unnecessary files and set permissions on settings.php ()
@lrobeson
lrobeson / Gruntfile.js
Created September 23, 2013 20:49
Grunt config file for Compass / Sass watch, sound notification, and LiveReload
// Configuring Grunt tasks:
// http://gruntjs.com/configuring-tasks
module.exports = function (grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
// Play sound: https://github.com/astronaughts/grunt-play
play: {
compasscomplete: {
file: '/System/Library/Sounds/purr.aiff'
@lrobeson
lrobeson / _fonts.scss
Created September 26, 2013 19:23
Sass partial - font face declarations for Drupal theme supplied font files
/**
* @file
* Font face declarations
*
* NOTES:
* 1) use .eot for full IE support or .woff for IE 9+ support
* (reference: http://caniuse.com/#search=font)
* 2) NOT using Compass' font-face mixin due to sketchy support, instead using
* http://www.paulirish.com/2009/bulletproof-font-face-implementation-syntax/
*/
@lrobeson
lrobeson / _fonts.scss
Created October 3, 2013 21:28
Sass partial - font face declaration for IcoMoon icon font
/**
* @file
* Font face declaration for IcoMoon icon font.
*
* Font source: http://icomoon.io/
*/
/* IcoMoon icon font */
@font-face {
font-family: 'icomoon';
@lrobeson
lrobeson / _fonts.scss
Created October 3, 2013 21:34
Sass partial - font face declarations for cloud.typography.com hosted fonts
/**
* @file
* Font face declarations for Typography.com hosted fonts
*/
/* replace this URL, it will be specific to each project */
@import "//cloud.typography.com/123456/789123/css/fonts.css";
/* Gotham Bold */
@font-face {