Skip to content

Instantly share code, notes, and snippets.

View kabanon's full-sized avatar

kabanon

  • Dijon
View GitHub Profile
@wesleybliss
wesleybliss / docker-compose-node-mongo.yml
Created September 9, 2016 21:37
Docker Compose with example App & Mongo
version: '2'
services:
myapp:
build: .
container_name: "myapp"
image: debian/latest
environment:
- NODE_ENV=development
- FOO=bar
volumes:
@szeidler
szeidler / d8-responsive-image-programmatically.php
Created March 15, 2016 08:42
Load and render responsive image from field in Drupal 8
<?php
function _load_header_image($variables) {
if ($node = $variables['node']) {
// Load main_image
$file = $node->field_main_image->entity;
if ($file) {
$variables = array(
'responsive_image_style_id' => 'header_image',
'uri' => $file->getFileUri(),
@scor
scor / install-drush7.sh
Last active December 30, 2015 14:39
Automatically install Drush 7 (only tested on Mac OS X)
#!/bin/bash
#
# Install Drush 7 from https://github.com/drush-ops/drush.git
# and creates a 'drush7' alias. Execute this from your terminal:
# bash <(curl -s https://gist.github.com/scor/7843568/raw/install-drush7.sh)
if [[ ! -e '~/tools/drush7' ]]; then
mkdir -p ~/tools
cd ~/tools