Skip to content

Instantly share code, notes, and snippets.

Avatar

Danny Englander danny-englander

View GitHub Profile
@mglaman
mglaman / html.preprocess.inc
Created Apr 19, 2014
Add FontAwesome.io to your Omega 4 subtheme
View html.preprocess.inc
<?php
<?php
/**
* @file
* Includes preproces of html
*/
/**
* Implements hook_preprocess_html().
*/
@dbarbar
dbarbar / realantivirus.sh
Created Sep 4, 2014
Definitely not a fake antivirus program for mac and linux to ensure PCI compliance.
View realantivirus.sh
#!/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.'
View links.md
@jibran
jibran / terms_from_term.inc
Last active Aug 29, 2015
Plugin to provide an relationship handler for all terms from term. plugins/relationships/terms_from_term.inc
View 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 Oct 5, 2015
Media queries to load only 1 image per browser width / pixel density
View SASS: Retina image media query mixin
// 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 Aug 14, 2012
Make Drupal Superfish dropdowns touch-friendly
View drupal-sf-touch.js
// 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 Sep 20, 2012
Sample grunt-jekyll grunt.js
View 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 Sep 21, 2012
drupal - remove div.panel-separator crap
View template.php
function theme_panels_default_style_render_region($vars) {
$output = '';
$output .= implode('', $vars['panes']);
return $output;
}
@afryer
afryer / gruntfile.js
Created May 22, 2013
grunt boilerplate
View gruntfile.js
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
compass: {
dev: {
options: {
@parkji
parkji / Gruntfile.js
Last active Dec 20, 2015
Grunt file for building and serving jekyll sites. Means you can just do grunt watch instead of running two Jekyll commands
View Gruntfile.js
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
shell: {
jekyllBuild: {
command: 'jekyll build'
},
jekyllServe: {
command: 'jekyll serve'
}