Skip to content

Instantly share code, notes, and snippets.

View axoplasm's full-sized avatar

Paul Souders axoplasm

View GitHub Profile
* [Install MySQL]
* [ensure PHP is loaded]
* [add local hostname in /private/etc/hosts]
* [add local vhost /private/etc/apache2/conf/httpd-vhosts.conf]
* Download latest alpha from https://drupal.org/node/3060/release
* create sites/default/files
$ mkdir sites/default/files
* copy settings.php
$ cp sites/default/default.settings.php sites/default/settings.php
* clear perms for sites/default
@axoplasm
axoplasm / gist:bdda3922fa43b2ef25d8
Last active January 17, 2018 12:41
Ditching Compass and Sass for LibSass

I had a large client framework extending my personal boilerplate that was taking upwards of 10seconds to compile with standard Ruby Sass. This framework had minimal dependencies:

I used Bundler to manage Ruby dependencies and ran tasks with Grunt — mainly compiling Sass via grunt-contrib-compass, and previewing with live-reload. Simple stuff.

But 10seconds was an unacceptable performance hit for me. I typically keep my monitor split in half (using Spectacle ), with a browser on one half and MacVim on the other. With Live Reload running I get a nearly realtime preview of my work … except for that one client framework, where I was gettin

Keybase proof

I hereby claim:

  • I am axoplasm on github.
  • I am axoplasm (https://keybase.io/axoplasm) on keybase.
  • I have a public key ASAZS39mQL2CjEJW2mdhMf6MTWbQf_sXT-VxFCStkcwEIgo

To claim this, I am signing this object:

@axoplasm
axoplasm / command-t-vim.md
Last active January 29, 2018 09:55
Set up wincent/command-t for both Vim & MacVim

I had trouble getting both Vim and MacVim to use the same Ruby executable, which is necessary to use the command-t plugin. The cannonical MacVim homebrew recipe hardlinks to /usr/bin/ruby while (terminal) Vim will use the system executable (whatever it is). If you install Ruby via homebrew it installs in /usr/local/bin/ruby.

Here's what I did:

$ brew install ruby # install most recent ruby (2.3.x)    
$ brew uninstall vim     
$ brew uninstall macvim     
$ brew install vim    
$ brew tap macvim-dev/macvim # dev branch of macvim, has better tap config 
@axoplasm
axoplasm / django-wagtail-dump.md
Last active February 6, 2019 00:16
Django Wagtail one-liner for database-agnostic JSON dumps

This is much harder than it needs to be.

See here and here. This issue won’t help.

(venv) $ ./manage.py dumpdata --indent=4 --natural-primary --natural-foreign -e contenttypes -e auth.Permission -e wagtailcore.groupcollectionpermission > dumpfile.json
@axoplasm
axoplasm / django-wagtail-do-app-platform.md
Last active December 10, 2023 20:27
HOWOTO migrate a Django Wagtail site on Digital Ocean App Platform
  1. Create Django App per DO tutorial or the DO quickstart (older)
    • ensure you have set the following LOCAL environment variables, e.g. in settings.local or other means:
import os
os.environ.setdefault('DEVELOPMENT_MODE', 'True')
os.environ.setdefault('DEBUG', 'True')
  1. Create Spaces (S3 Bucket) for media
  2. (upload media to new space)
  3. Optional settings for the new storage space if you want to use a custom endpoint:
@axoplasm
axoplasm / lando-drupal7.md
Last active August 1, 2023 13:26
Creating a local Drupal 7 site with Lando

very good documentation at https://docs.lando.dev/drupal/

  1. <install lando> per the instructions here
  2. $ lando init
  • follow the prompts as described here
  • Alternatively add Lando to an existing project with a bare-bones .lando.yml:
name: myproject
recipe: drupal7