Skip to content

Instantly share code, notes, and snippets.

Avatar

Danny Englander danny-englander

View GitHub Profile
View gulpfile.gulp.spritesmith.js
var gulp = require('gulp'),
sass = require('gulp-ruby-sass'),
spritesmith = require('gulp.spritesmith'),
compass = require('gulp-compass'),
path = require('path'),
minifyCss = require('gulp-minify-css'),
browserSync = require('browser-sync'),
tinypng = require('gulp-tinypng'),
autoprefixer = require('gulp-autoprefixer'),
plumber = require('gulp-plumber');
@danny-englander
danny-englander / zsh-backup.sh
Last active Sep 1, 2016
An automated drush backup script with folder pruning using ZSH Globbing
View zsh-backup.sh
#! /bin/zsh
## An automated Drupal backup script using Drush and ZSH globbing.
## Ideally place this script in usr/local/bin
## Set this to run via a cronjob.
## Easy crontab setup: http://crontab-generator.org
## Inspiration from: by https://www.drupal.org/node/470114
View gulpfile.js
// Include gulp
var gulp = require('gulp');
// Include plugins
var jshint = require('gulp-jshint'),
plumber = require('gulp-plumber'),
sass = require('gulp-sass'),
spritesmith = require('gulp.spritesmith'),
uglify = require('gulp-uglify'),
concat = require('gulp-concat'),
@danny-englander
danny-englander / field.html.twig
Created Dec 21, 2016 — forked from lewisnyman/field.html.twig
minimal field.html.twig — Drupal 8
View field.html.twig
{% for item in items %}
{{ item.content }}
{% endfor %}
@danny-englander
danny-englander / uikit-icons.yml
Last active Mar 4, 2017
UIKit 3 icon listing in yaml format
View uikit-icons.yml
- name: home
category: app
- name: sign-out
category: app
- name: sign-in
category: app
- name: user
category: app
- name: users
category: app
@danny-englander
danny-englander / openshift-drupal-deploy
Last active Jun 24, 2017
OpenShift Origin Drupal Deploy Script
View openshift-drupal-deploy
#!/bin/bash
# This deploy hook gets executed after dependencies are resolved and the
# build hook has been run but before the application has been started back
# up again. This script gets executed directly, so it could be python, php,
# ruby, etc.
# Bash help: http://www.panix.com/~elflord/unix/bash-tute.html
# For information about action hooks supported by OpenShift, consult the documentation:
# http://openshift.github.io/documentation/oo_user_guide.html#the-openshift-directory
View rvm command file
#!/usr/bin/env bash
# Place this in your project at /.docksal/commands and call this file rvm, the name should match the command.
# Run this script as fin rvm.
# Install RVM and dependancies, activate and source it, choose the version.
# These two lines are needed to have a valid RVM install
fin exec bash -c "curl -#LO https://rvm.io/mpapis.asc"
View TwoColumnLayout.php
<?php
namespace Drupal\custom_layout\Plugin\Layout;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Layout\LayoutDefault;
use Drupal\Core\Plugin\PluginFormInterface;
/**
* Configurable two column layout plugin class.
@danny-englander
danny-englander / cloudSettings
Last active Oct 1, 2020
Custom Docksal bash script (command) to install RVM, NVM, Yarn, Gulp, and jekyll
View cloudSettings
{"lastUpload":"2020-10-01T13:18:46.865Z","extensionVersion":"v3.4.3"}
View jquery.responsive-classes.js
/*
* Inspired by:
* http://designedbythomas.co.uk/blog/how-detect-width-web-browser-using-jquery
*
* This script is ideal for getting specific class depending on device width
* for enhanced theming. Media queries are fine in most cases but sometimes
* you want to target a specific JQuery call based on width. This will work
* for that. Be sure to put it first in your script file. Note that you could
* also target the body class instead of 'html' as well.
* Modify as needed