Skip to content

Instantly share code, notes, and snippets.

@labbydev
labbydev / Gulpfile.js
Last active August 29, 2015 14:19
Gulpfile for working with Jekyll and/or Drupal (includes sass compiling, jekyll building, browser reloading, linting, performance testing, minifying, deploying to GitHub pages)
var gulp = require('gulp');
var paths = require('compass-options').dirs();
var compass = require('gulp-compass');
var prefix = require('gulp-autoprefixer');
var changed = require('gulp-changed');
var imagemin = require('gulp-imagemin');
var browserSync = require('browser-sync');
var cp = require('child_process');
var scsslint = require('gulp-scss-lint');
var cssmin = require('gulp-cssmin');
@labbydev
labbydev / vagrant.txt
Created September 21, 2015 19:32
Fresh Vagrant Up
Palantirs-MacBook-Pro:drupal-skeleton LaurenByrwa$ vagrant up
Bringing machine 'default' up with 'vmware_fusion' provider...
==> default: AutoNetwork assigning "10.20.2.3" to 'default'
==> default: Cloning VMware VM: 'palantir/ubuntu-default'. This can take some time...
==> default: Checking if box 'palantir/ubuntu-default' is up to date...
==> default: Verifying vmnet devices are healthy...
==> default: Preparing network adapters...
==> default: Starting the VMware VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 172.16.253.137:22
repositories > init-repository:
[echo] Cloning the repository from uchicagoharris@svn-20497.prod.hosting.acquia.com:uchicagoharris.git
[phing] /var/www/harris.local/./vendor/palantirnet/the-build/tasks/lib/repositories.xml:35:12: /var/www/harris.local/./vendor/palantirnet/the-build/tasks/lib/repositories.xml:39:48: The remote end hung up unexpectedly
#0 /var/www/harris.local/vendor/phing/phing/classes/phing/UnknownElement.php(100): GitCloneTask->main()
#1 /var/www/harris.local/vendor/phing/phing/classes/phing/Task.php(283): UnknownElement->main()
#2 /var/www/harris.local/vendor/phing/phing/classes/phing/tasks/system/SequentialTask.php(58): Task->perform()
#3 /var/www/harris.local/vendor/phing/phing/classes/phing/tasks/system/IfTask.php(172): SequentialTask->main()
#4 /var/www/harris.local/vendor/phing/phing/classes/phing/TaskAdapter.php(61): IfTask->main(Object(Project))
#5 /var/www/harris.local/vendor/phing/phing/classes/phing/UnknownElement.php(100): TaskAdapter->main()
Notice: Undefined index: #prefix in Drupal\file\Element\ManagedFile::uploadAjaxCallback() (line 191 of /mnt/www/html/uchicagoharrisstg/docroot/core/modules/file/src/Element/ManagedFile.php) #0 /mnt/www/html/uchicagoharrisstg/docroot/core/includes/bootstrap.inc(548): _drupal_error_handler_real(8, 'Undefined index...', '/mnt/www/html/u...', 191, Array) #1 /mnt/www/html/uchicagoharrisstg/docroot/core/modules/file/src/Element/ManagedFile.php(191): _drupal_error_handler(8, 'Undefined index...', '/mnt/www/html/u...', 191, Array) #2 [internal function]: Drupal\file\Element\ManagedFile::uploadAjaxCallback(Array, Object(Drupal\Core\Form\FormState), Object(Symfony\Component\HttpFoundation\Request)) #3 /mnt/www/html/uchicagoharrisstg/docroot/core/lib/Drupal/Core/Form/FormAjaxResponseBuilder.php(69): call_user_func_array(Array, Array) #4 /mnt/www/html/uchicagoharrisstg/docroot/core/lib/Drupal/Core/Form/EventSubscriber/FormAjaxSubscriber.php(98): Drupal\Core\Form\FormAjaxResponseBuilder->buildResponse(Object(Symfony\Compo
chicago-law > drupal-reinstall-module:
[drush] Executing '/var/www/uchicago-law.local/vendor/bin/drush --nocolor --root="/var/www/uchicago-law.local/web" --uri="http://uchicago-law.local" --config="/var/www/uchicago-law.local/conf/drushrc.php" --yes pm-uninstall "ucl_d6_migration"'...
ucl_d6_migration was successfully uninstalled. [ok]
[drush] The following extensions will be uninstalled: ucl_d6_migration
[drush] Do you really want to continue? (y/n): y
[drush] Executing '/var/www/uchicago-law.local/vendor/bin/drush --nocolor --root="/var/www/uchicago-law.local/web" --uri="http://uchicago-law.local" --config="/var/www/uchicago-law.local/conf/drushrc.php" --yes pm-enable "ucl_d6_migration"'...
ucl_d6_migration was enabled successfully. [ok]
[drush] The following extensions will be enabled: ucl_d6_migration
[drush] Do you really want to continue? (y/n): y
@labbydev
labbydev / amchart.txt
Created May 18, 2017 01:47
Example amchart content
<!DOCTYPE html>
<html>
<head>
<title>chart created with amCharts | amCharts</title>
<meta name="description" content="chart created using amCharts live editor" />
<!-- amCharts javascript sources -->
<script type="text/javascript" src="https://www.amcharts.com/lib/3/amcharts.js"></script>
<script type="text/javascript" src="https://www.amcharts.com/lib/3/serial.js"></script>
{
$rteElements = [];
// Hours section.
foreach ($hours as $index => $hour) {
$entity = $hour->entity;
if (!method_exists($entity, 'hasField')) {
return FALSE;
}
oblem 1
- palantirnet/the-build 1.0.0 requires continuousphp/phing-drush-task dev-master -> satisfiable by continuousphp/phing-drush-task[dev-master].
- palantirnet/the-build 1.0.0-alpha requires continuousphp/phing-drush-task dev-master -> satisfiable by continuousphp/phing-drush-task[dev-master].
- palantirnet/the-build 1.0.0-alpha2 requires continuousphp/phing-drush-task dev-master -> satisfiable by continuousphp/phing-drush-task[dev-master].
- palantirnet/the-build 1.0.1 requires continuousphp/phing-drush-task dev-master -> satisfiable by continuousphp/phing-drush-task[dev-master].
- palantirnet/the-build 1.1.0 requires continuousphp/phing-drush-task dev-master -> satisfiable by continuousphp/phing-drush-task[dev-master].
- palantirnet/the-build 1.2.0 requires continuousphp/phing-drush-task dev-master -> satisfiable by continuousphp/phing-drush-task[dev-master].
- palantirnet/the-build 1.3.0 requires continuousphp/phing-drush-task dev-master -> satisfiable by continuousphp/phin
Problem 1
- drupal/console 0.11.3 requires stecman/symfony-console-completion ^0.5.1 -> satisfiable by stecman/symfony-console-completion[0.5.1].
- Conclusion: don't install symfony/console v3.2.13
- Conclusion: don't install symfony/console v2.8.27
- Conclusion: don't install symfony/console v2.8.26
- Conclusion: don't install symfony/console v3.2.12
- Conclusion: don't install symfony/console v2.8.25
- Conclusion: don't install symfony/console v2.8.24
- Conclusion: don't install symfony/console v3.2.11

Styleguide Throwdown - Part 1

Ticket

Notes

Large goals of style guide:

"Platform agnostic enough” (to be useful to other teams) To make our development process easier Developers report that the current SG2 approach is not furthering those goals. In particular, there are complaints about having to do double work, and the fragility of our build and deploy process.