Skip to content

Instantly share code, notes, and snippets.

@saltednut
saltednut / dice.sh
Last active March 26, 2016 04:09
quick build script for Drupal distributions that ship with a build makefile
#!/usr/bin/env bash
# Usage: dice makefile docroot dbuser dbpass dbname sitename install-profile
drupal_install_clean_env() {
if [[ -r $2 ]]; then
sudo rm -r $2
cd ~/
fi
if [[ -r $1 ]]; then
drush make --working-copy --concurrency=5 $1 $2
@saltednut
saltednut / sps-ux
Last active December 17, 2015 22:09
SPS UX Improvement Ideas
Improve the iconography for the Interactive Preview (eye icon)
Use red to indicate previews rather than green.
Replace the 'eye' on the actual preview items with an 'X' that also has the ability to disable the site preview.
Use SPS as the way to view the current draft. Rather than having 'View Draft' and 'View Published' buttons, one would use the SPS to view the draft content and turn it off to view the published content.
Clean up the Interactive Info Bar to work with more ajax - ie: as soon as one clicks on a collection, the SPS is immediately enabled and there is no need for an 'Enable Preview' button.
Improve the experience of using the Interactive Info Bar - right now its an unclean and buggy experience overall.
@saltednut
saltednut / vice.sh
Last active December 17, 2015 22:09
quick build for Drupal distro using Vagrant and drupal_cookbook
#!/usr/bin/env bash
# Usage: vice makefile destination distro project vagrant-command
vagrant_install_clean_env() {
MAKEFILE=$1
TARGET=$2
DISTRO=$3
PROJECT=$4
VAGRANT=$5
if [[ ! -r ~/.vice ]]; then
@saltednut
saltednut / Berksfile
Last active December 17, 2015 22:09
Berksfile for usage with drupal_cookbook
site :opscode
cookbook "drupal", git: "https://github.com/promet/drupal_cookbook.git"
cookbook "chef-solo-search", git: "https://github.com/edelight/chef-solo-search.git"
cookbook "solo-helper", git: "https://github.com/glennpratt/solo-helper_cookbook.git"
cookbook "mysql", "~> 3.0.12"
@saltednut
saltednut / Vagrantfile
Last active December 17, 2015 22:09
Vagrantfile to be used with drupal_cookbook
drupaldistro = ENV['DRUPAL_DISTRO']
project = ENV['DRUPAL_PROJECT']
Vagrant.configure("2") do |config|
# Install Chef
config.omnibus.chef_version = :latest
# The path to the Berksfile to use with Vagrant Berkshelf
config.berkshelf.enabled = true
config.berkshelf.berksfile_path = "./Berksfile"
@saltednut
saltednut / up.sh
Created June 13, 2013 23:33
unknown pleasures
#!/usr/bin/env bash
echo " ..cl:."
echo " ..... .cdk00d"
echo "
@saltednut
saltednut / ho-ho-ho.make
Last active December 31, 2015 16:48
CKEditor 4.3.1 & Latest Media for Drupal - Christmas 2013 Edition
projects[ckeditor][version] = "1.x-dev"
projects[ckeditor][type] = "module"
projects[ckeditor][subdir] = "contrib"
projects[ckeditor][download][type] = "git"
projects[ckeditor][download][revision] = "57245a9"
projects[ckeditor][download][branch] = "7.x-1.x"
; Integration with Media 2.x
; http://drupal.org/node/1504696
projects[ckeditor][patch][1504696] = "http://drupal.org/files/issues/ckeditor-accomodate-latest-media-changes-1504696-120.patch"
; External plugin declarations are redundant.
@saltednut
saltednut / df-make.md
Last active January 1, 2016 19:59
Demo Framework Makefile Guidelines

Order of items for each module is always consistent.

  1. Version
  2. Type
  3. Subdir
  4. Download Type
  5. Download Revision
  6. Download Branch
  7. Patches
@saltednut
saltednut / remove-web-tools.sh
Last active February 10, 2020 13:00
Remove MySQL and turn off Apache in OSX
sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist
sudo rm /usr/local/mysql
sudo rm -rf /usr/local/mysql*
sudo rm -rf /Library/StartupItems/MySQLCOM
sudo rm -rf /Library/PreferencePanes/My*
rm -rf ~/Library/PreferencePanes/My*
sudo rm -rf /Library/Receipts/mysql*
sudo rm -rf /Library/Receipts/MySQL*
sudo rm -rf /var/db/receipts/com.mysql.*
@saltednut
saltednut / keybase.md
Last active September 23, 2020 14:51

Keybase proof

I hereby claim:

  • I am saltednut on github.
  • I am saltednut (https://keybase.io/saltednut) on keybase.
  • I have a public key ASCC3DswrEX_rnZQZKTXSA-hYef_J0GGBPvEpnCXl-k1Nwo

To claim this, I am signing this object: