Skip to content

Instantly share code, notes, and snippets.


Danny Englander danny-englander

View GitHub Profile
aarongustafson / responsive-iframes.css
Created Oct 25, 2011
Responsive iFrames with jQuery
View responsive-iframes.css
iframe {
max-width: 100%;
pascalduez / html.tpl.php
Created Dec 1, 2011
Drupal 7 — HTML5 html.tpl.php
View html.tpl.php
<!DOCTYPE html>
<html<?php print $html_attributes; ?>>
<?php print $head; ?>
<title><?php print $head_title; ?></title>
<?php print $styles; ?>
<?php print $scripts; ?>
<body<?php print $body_attributes;?>>
lukekarrys /
Last active Feb 4, 2018
Instagram Jekyll Plugin for to Embed Photos
peteboere / jquery.alterclass.js
Created Dec 24, 2011
jQuery alterClass plugin: Remove element classes with wildcard matching. Optionally add classes.
View jquery.alterclass.js
* jQuery alterClass plugin
* Remove element classes with wildcard matching. Optionally add classes:
* $( '#foo' ).alterClass( 'foo-* bar-*', 'foobar' )
* Copyright (c) 2011 Pete Boere (
* Free under terms of the MIT license:
dvessel / README.mdown
Last active May 15, 2020
Sass+Compass, Guard, LiveReload
View README.mdown

This will enable Sass+Compass with LiveReload through Guard. (Guard screen cast)

You will also need a browser component to communicate with LiveReload. (browser extension, livereload.js)

If you prefer going through a GUI, that option is available. The following instructions is specific to Mac OS X and it works through the command line.

Note that this is not specific to Rails projects. This can work for any standalone front-end project.


roboshoes / touchmouse.js
Created Apr 13, 2012
This snippet maps mouse events and touch events onto one single event. This makes it easier in the code since you have to listen to only one event regardles whether it's desktop or mobile.
View touchmouse.js
(function() {
TouchMouseEvent = {
DOWN: "touchmousedown",
UP: "touchmouseup",
MOVE: "touchmousemove"
maxrice / us-state-names-abbrevs.php
Created May 23, 2012
US State Names & Abbreviations as PHP Arrays
View us-state-names-abbrevs.php
/* From */
$us_state_abbrevs_names = array(
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)
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)
background: transparent url('mobile/loaders/loader-spin.png', image)
dougalcampbell / drupal-sf-touch.js
Created Aug 14, 2012
Make Drupal Superfish dropdowns touch-friendly
View drupal-sf-touch.js
// adapted from:
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 / grunt.js
Created Sep 20, 2012
Sample grunt-jekyll grunt.js
View grunt.js
// Sample grunt-jekyll grunt.js file
/*global module:false*/
module.exports = function(grunt) {
// Project configuration.
jekyll: {