Skip to content

Instantly share code, notes, and snippets.

View jamiehollern's full-sized avatar

Jamie Hollern jamiehollern

  • Tag1 Consulting
  • Dùn Phris/Zürich
  • 04:25 (UTC +01:00)
View GitHub Profile
<?php
$adam = array(
'remote-host' => 'adammalone.net',
'root' => '/var/www/html/adammalone/docroot',
'uri' => 'adammalone.net',
'strict' => 0,
'path-aliases' => array(
'%dump-dir' => '/home/adammalone/.drush/dumps',
'%files' => 'sites/default/files',
@greg-1-anderson
greg-1-anderson / gist:fb1dba054c35c46af644
Last active November 22, 2016 11:43
Workaround for lack of ssl support at fastly for updates.drupal.org
<?php
// Place in $HOME/.drush/drushrc.php
// OBSOLETE workaround for lack of SSL cert handling at fastly for updates.drupal.org.
// Running without ssl exposes you to man-in-the-middle attacks, so REMOVE THIS, since
// https support is now unofficially provided again.
// $command_specific['pm-download']['source'] = 'http://updates.drupal.org/release-history';
@kvangundy
kvangundy / marchMadnessBracketBuilder.adoc
Last active May 21, 2017 18:00
March Madness Bracket Builder with Neo4j

A March Madness Recommendation Engine

5nlEMrk
@drefined
drefined / app.php
Created July 8, 2012 21:08
This is the simple silex app.
<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Silex\Application;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
$app = new Silex\Application();
@webflo
webflo / drupal-finder.php
Created October 26, 2017 15:03
drupal-finder.php
<?php
// Usage: php drupal-finder.php /var/www/some/example/path
include __DIR__ . '/vendor/autoload.php';
$path = array_pop($argv);
$finder = new \DrupalFinder\DrupalFinder();
print "Input: " . $path . PHP_EOL;
@otarza
otarza / Drupal-8-register-form.php
Created March 2, 2016 10:42
Render drupal 8 register form
<?php
$entity = \Drupal::entityTypeManager()->getStorage('user')->create(array());
$formObject = \Drupal::entityTypeManager()
->getFormObject('user', 'register')
->setEntity($entity);
$form = \Drupal::formBuilder()->getForm($formObject);
print \Drupal::service('renderer')->render($form);
@Leksat
Leksat / Composer JS libraries example.diff
Created April 26, 2017 08:03
In this example we add masonry, imagesloaded, and dropzone libraries to Composer.
diff --git a/.gitignore b/.gitignore
index fc00ed5..ac82bec 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,6 +5,7 @@ web/core
web/modules/contrib
web/themes/contrib
web/profiles/contrib
+web/libraries
@crittermike
crittermike / router_rebuild.sh
Created September 16, 2016 15:15
Rebuild Drupal 8 routing table with Drush
drush ev '\Drupal::service("router.builder")->rebuild();'
@technology-amazeelabs
technology-amazeelabs / Drupal 8 Local Settings.md
Last active June 19, 2019 09:27
Drupal 8 local override for Settings and Services files

Add the following two files: settings.local.php and services.local.php to the web/sites/default/ folder within your Drupal 8 project to override settings such as enabling Twig debug and disabling cache.

Depending on the project, you may need to rename the files to local.settings.php and local.services.yml respectively.

@jmolivas
jmolivas / README.md
Last active August 5, 2019 20:01
Render a form on a page via a Controller on Drupal8.

Create file at ~/console/chain/generate-controller-form-render.yml containing:

command:
  name: 'generate:controller:form:render'
  description: 'Controller + Form generator'
commands:
  - command: 'generate:module'
    options:
        module: example