Skip to content

Instantly share code, notes, and snippets.

View marklabrecque's full-sized avatar

Mark Labrecque marklabrecque

View GitHub Profile
@marklabrecque
marklabrecque / dark.md
Created July 26, 2018 21:08 — forked from a7madgamal/dark.md
Dark mode for Slack on MacOS
  1. Close slack
  2. Open this file /Applications/Slack.app/Contents/Resources/app.asar.unpacked/src/static/ssb-interop.js
  3. Append this to it
document.addEventListener('DOMContentLoaded', function() {
 $.ajax({
   url: 'https://cdn.rawgit.com/laCour/slack-night-mode/master/css/raw/black.css',
   success: function(css) {
 $("").appendTo('head').html(css);
@marklabrecque
marklabrecque / uuid_clear.sh
Last active August 23, 2017 19:44
Removing UUIDs from D8 .yml files
find ./ -type f -exec sed -i -e '/^uuid: /d' {} \;
find ./ -type f -exec sed -i -e '/_core/,+1d' {} \;
rm *-e
@marklabrecque
marklabrecque / clean_up.sql
Created August 23, 2017 19:42
Uninstalling Drupal 8 core Content Translation
UPDATE `media_field_data`
SET content_translation_source=null, content_translation_outdated=null, content_translation_uid=null;
UPDATE `media_field_revision`
SET content_translation_source=null, content_translation_outdated=null, content_translation_uid=null;
UPDATE `paragraphs_item_revision_field_data`
SET content_translation_source=null, content_translation_outdated=null, content_translation_changed=null;
UPDATE `paragraphs_item_field_data`
SET content_translation_source=null, content_translation_outdated=null, content_translation_changed=null;
UPDATE `taxonomy_term_field_data`
SET content_translation_source=null, content_translation_outdated=null, content_translation_uid=null, content_translation_status=null, content_translation_created=null;
@marklabrecque
marklabrecque / settings.php
Created July 31, 2017 15:21
Enabling php error output to a Drupal 8 site.
<?php
$config['system.logging']['error_level'] = 'verbose';
@marklabrecque
marklabrecque / .zshrc
Created July 20, 2017 16:13
Docker/Compose utilities
function dssh() {
docker exec -ti $1 /bin/bash
}
function drd() {
docker exec shipyard_php_1 /code/vendor/bin/drush $@ --uri=http://web --root=/code/web
}
alias artisan='php artisan'
alias docker-kill-all='docker kill $(docker ps -q) && docker container prune -f'
@marklabrecque
marklabrecque / .zshrc
Created July 10, 2017 15:26
Global docker management script (hardcoded repo PATH)
function shipyard() {
# default is 'down' if no parameter is supplied
if [ -z "$1" ]
then
docker-kill-all
else
if [[ $1 == "down" ]]
then
docker-kill-all
fi
@marklabrecque
marklabrecque / settings.php
Created June 27, 2017 20:44
Drupal 8 - Show hidden errors
<?php
$config['system.logging']['error_level'] = 'verbose';
@marklabrecque
marklabrecque / docker_purge.sh
Created April 17, 2017 21:14
Clearing orphaned Docker containers (exited, but not removed)
docker rm $(docker ps -q -f status=exited)
@marklabrecque
marklabrecque / gist:e477cc176c1a511d75aa4a535f63f9ec
Created March 16, 2017 15:58
Updating Vagrantfile to use host-updater Vagrant plugin
unless Vagrant.has_plugin?("vagrant-hostsupdater")
raise 'vagrant-hostsupdater is not installed! run `vagrant plugin install vagrant-hostsupdater` to install it.'
end
# Change HOSTNAME to the hostname defined in the Vagrantfile already
project_hostname = "HOSTNAME"
# After puppet gets provisioned, at the followign line
config.vm.hostname = project_hostname