Skip to content

Instantly share code, notes, and snippets.

View danny-englander's full-sized avatar

Danny Englander (he/him) danny-englander

View GitHub Profile
@mglaman
mglaman / html.preprocess.inc
Created April 19, 2014 03:55
Add FontAwesome.io to your Omega 4 subtheme
<?php
<?php
/**
* @file
* Includes preproces of html
*/
/**
* Implements hook_preprocess_html().
*/
@dbarbar
dbarbar / realantivirus.sh
Created September 4, 2014 16:12
Definitely not a fake antivirus program for mac and linux to ensure PCI compliance.
#!/bin/sh
# Software must have the ability to auto-update itself and virus definitions as well as log scan results.
#
# Don't read below this line.
echo 'Auto updating.'
sleep 30
echo 'Updaing virus definitions.'
@jibran
jibran / terms_from_term.inc
Last active August 29, 2015 14:15
Plugin to provide an relationship handler for all terms from term. plugins/relationships/terms_from_term.inc
<?php
/**
* @file
* Plugin to provide an relationship handler for all terms from term.
*/
/**
* Plugins are described by creating a $plugin array which will be used
* by the system that includes this file.
@cacheflowe
cacheflowe / SASS: Retina image media query mixin
Last active October 5, 2015 22:08
Media queries to load only 1 image per browser width / pixel density
// webkit-only .sass --------------------------------
@media (min-width: 20px) and (max-width: 480px) and (-webkit-min-device-pixel-ratio: 1.5)
#site-loader-inner
background: transparent url('mobile/loaders/loader-spin@2x.png', image)
@media (min-width: 20px) and (max-width: 480px) and (-webkit-max-device-pixel-ratio: 1.5)
#site-loader-inner
background: transparent url('mobile/loaders/loader-spin.png', image)
@dougalcampbell
dougalcampbell / drupal-sf-touch.js
Created August 14, 2012 17:52
Make Drupal Superfish dropdowns touch-friendly
// adapted from: http://snippets.webaware.com.au/snippets/make-css-drop-down-menus-work-on-touch-devices/
Drupal.behaviors.touchdevice_dropdowns = function(context) {
// see whether device supports touch events (a bit simplistic, but...)
var hasTouch = ("ontouchstart" in window);
// hook touch events for drop-down menus
if (hasTouch && document.querySelectorAll) {
var i, len, element,
dropdowns = document.querySelectorAll(".sf-menu .menuparent > a");
@dannygarcia
dannygarcia / grunt.js
Created September 20, 2012 02:39
Sample grunt-jekyll grunt.js
// Sample grunt-jekyll grunt.js file
// https://github.com/dannygarcia/grunt-jekyll
/*global module:false*/
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
jekyll: {
@anthonyringoet
anthonyringoet / template.php
Created September 21, 2012 10:29
drupal - remove div.panel-separator crap
function theme_panels_default_style_render_region($vars) {
$output = '';
$output .= implode('', $vars['panes']);
return $output;
}
@afryer
afryer / gruntfile.js
Created May 22, 2013 06:29
grunt boilerplate
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
compass: {
dev: {
options: {
@parkji
parkji / Gruntfile.js
Last active December 20, 2015 22:59
Grunt file for building and serving jekyll sites. Means you can just do grunt watch instead of running two Jekyll commands
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
shell: {
jekyllBuild: {
command: 'jekyll build'
},
jekyllServe: {
command: 'jekyll serve'
}