Skip to content

Instantly share code, notes, and snippets.

@martinherweg
martinherweg / downloadCraftPlugins.js
Last active July 24, 2017 12:20
Allows you to install new Craft
/**
* Download Craft Plugins
*
* @package generator-mh-boilerplate
* @author Martin Herweg <[email protected]>
*/
const inquirer = require('inquirer');
const download = require('download');
const ProgressBar = require('progress');
@martinherweg
martinherweg / browserSync.js
Last active May 29, 2021 08:07
Webpack + BrowserSync + HMR
/**
|--------------------------------------------------------------------------
| gulp browser-sync
|--------------------------------------------------------------------------
*
* Browser Sync
* @description Refresh the Brwoser after File Change.
* Combined with webpack for HMR or Content Reload
*
* @package generator-mh-boilerplate
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.com
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters
* Source: https://core.trac.wordpress.org/browser/tags/3.9/src/wp-includes/query.php
*/
$args = array(
@martinherweg
martinherweg / gist:194e2c31671ef1ee2626
Last active August 29, 2015 14:14
gulp sass with sourcemap
gulp.task('sass', function() {
gulp.src(['assets/scss/**/*.scss', '!assets/scss/templates/*.scss'])
.pipe(plumber({errorHandler: on_Error}))
.pipe(gulpif(condition, sass({require: ['susy'], style: 'expanded', sourcemap: true}), sass()))
.pipe(filter('**/*.css'))
.pipe(sourcemaps.init({loadMaps:true}))
.pipe(postcss([autoprefixer({ browsers: ['last 2 version', 'ie 9'], cascade: true})]))
.on('error', function(err) { console.log(err.message); })
.pipe(sourcemaps.write('.'))
.pipe(gulp.dest('dist/css'))