Skip to content

Instantly share code, notes, and snippets.

@wimleers
wimleers / ama-manual-cloud-deploy.md
Created June 10, 2020 15:24 — forked from balsama/ama-manual-cloud-deploy.md
Instructions to manually deploy Migrate Assistant to an Acquia Cloud environment

Manually deploy a newly created migrate project to Acquia Cloud

@TODO

Updated 10 June

  • Manually test again
  • Add instructions on scp-ing files directory too

Prerequisites

  1. Admin access to an Acquia Cloud hosting environment.
  2. A Drupal 7 site running locally
@wimleers
wimleers / dcon-vienna-api-first.md
Last active September 25, 2017 07:56 — forked from e0ipso/api-first-priorities.md
DrupalCon Vienna API-First Sprints
@wimleers
wimleers / sphp.sh
Created October 17, 2016 11:37 — forked from w00fz/sphp.sh
PHP switcher
#!/bin/bash
# Check if command was ran as root.
if [[ $(id -u) -eq 0 ]]; then
echo "The command \"sphp\" should not be executed as root or via sudo directly."
echo "When a service requires root access, you will be prompted for a password as needed."
exit 1
fi
# Usage
public function getUntransformedText(EntityInterface $entity, $field_name, $langcode, $view_mode) {
$response = new AjaxResponse();
// Direct text editing is only supported for single-valued fields.
$field = $entity->getTranslation($langcode, FALSE)->$field_name;
$editable_text = check_markup($field->value, $field->format, $langcode, FALSE, array(FILTER_TYPE_TRANSFORM_REVERSIBLE, FILTER_TYPE_TRANSFORM_IRREVERSIBLE));
$response->addCommand(new GetUntransformedTextCommand($editable_text));
return $response;
}
@wimleers
wimleers / drupal.mdown
Created October 2, 2012 19:35 — forked from lyzadanger/drupal.mdown
RE: My Woes with Drupal

This is a reply to https://gist.github.com/3800860.

Hokay, please keep in mind I know nothing about Drupal 8, so much of what I comment on here may well be problems that are already being addressed or have been solved therein. AGAIN: If I make a poopoo face at something that has been rectified in D8, please don't be terribly irritated at me!

I am a longtime D6 dev, and have been working in D7 for the past few months, as well.

Core issues as I see them in terms of the mobile Web and the pan-device Web as a whole:

  • Controllers need to be separated from template/view layers in so much as is possible. There is still too much munging between page callbacks/action and the rendered response. I think this is sort of part of what render arrays aim to ease in D7, but render arrays are complex and abysmally documented. I have asked around and no one can find true documentation on them. They're far too convoluted to figure out on one's own unless one has a lot of time, which I sadly do not.
  • Let m
var setTextMeasure = function (contentElement, targetMeasure, maxSize, minSize) {
if (!contentElement) contentElement = document.createElement('p');
if (!targetMeasure) targetMeasure = 66;
if (!maxSize) maxSize = 16;
if (!minSize) minSize = 9;
var sizer = contentElement.cloneNode();
sizer.style.cssText = 'margin: 0; padding: 0; color: transparent; background-color: transparent; position: absolute;';
#!/usr/bin/env perl
#
###########################################################################
# frameworkdeployqt.pl v.1.0.1 - a script for deploying frameworks #
# that are using Qt libs #
# #
# Copyright (C) 2009 Dominik Kapusta <d@ayoy.net> #
# #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #