This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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'), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// based on https://github.com/nicolashery/nicolashery.com | |
module.exports = function(grunt) { | |
// Load all NPM grunt tasks | |
require('matchdep').filterAll('grunt-*').forEach(grunt.loadNpmTasks); | |
// Project configuration | |
grunt.initConfig({ | |
meta: { | |
scripts: [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function urlFromHash() { | |
if (location.hash.substr(0, 2) != '#!') { | |
return null; | |
} | |
// why not location.hash? => http://stackoverflow.com/q/4835784/298479 | |
return location.href.split('#')[1].substr(1); | |
} | |
$('#gallery').magnificPopup({ | |
type: 'image', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function NAMEOFTHEME_preprocess_page(&$vars) { | |
// Use grouped import technique for more than 30 un-aggregated stylesheets (css limit fix for IE) | |
$css = drupal_add_css(); | |
if (NAMEOFTHEME_css_count($css) > 26) { | |
$styles = ''; | |
$suffix = "\n".'</style>'."\n"; | |
foreach ($css as $media => $types) { | |
$prefix = '<style type="text/css" media="'. $media .'">'."\n"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;Content Type | |
features[node][] = event | |
;View | |
features[views_view][] = event_organizers | |
;User permission | |
features[user_permission][] = edit own event content | |
;Image style |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @file | |
* local.settings.php (Drupal 6.x) | |
* | |
* This settings file is intended to contain settings specific to a local | |
* development environment, by overriding options set in settings.php. | |
* | |
* Include this file from your regular settings.php by including this at the | |
* bottom: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
function loadGalleryDeepLink() | |
{ | |
var prefix = "#gallery-"; | |
var h = location.hash; | |
if (document.g_magnific_hash_loaded === undefined && h.indexOf(prefix) === 0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function (){ | |
// element-1 and element-2 are hrefs that trigger any given colorbox | |
$(".element-1").click(function() { | |
$('#colorbox').addClass("cb1").removeClass('cb2'); //add a custom class to #colorbox | |
}); | |
$(".element-2").click(function() { |