Skip to content

Instantly share code, notes, and snippets.

View sagalbot's full-sized avatar
🏔️

Jeff Sagal sagalbot

🏔️
View GitHub Profile
@sagalbot
sagalbot / bootstrap.php
Created April 1, 2017 22:50
Testing boilerplate for a WooCommerce extension.
<?php
/**
* PHPUnit bootstrap file
*
* @package Cli_Tests
*/
$wc = getenv( 'WC_TESTS_DIR' ) ? getenv( 'WC_TESTS_DIR' ) : '/tmp/woocommerce/tests';
$wp = getenv( 'WP_TESTS_DIR' ) ? getenv( 'WP_TESTS_DIR' ) : '/tmp/wordpress-tests-lib';
<style lang="scss">
.github-search {
&.panel-default {
border: none;
}
.panel-heading,
.panel-footer {
background: none;
}
function collapse_pwd {
echo $(pwd | sed -e "s,^$HOME,~,")
}
function prompt_char {
git branch >/dev/null 2>/dev/null && echo '±' && return
hg root >/dev/null 2>/dev/null && echo '☿' && return
# echo '○'
echo '→'
}
@sagalbot
sagalbot / karma.conf.js
Created April 29, 2016 19:28
Karma Config for Webpack/Vue/Jasmine
module.exports = function (config) {
config.set({
browsers: ['PhantomJS'],
frameworks: ['jasmine'],
files: ['test/**/*.js'],
reporters: ['spec'],
preprocessors: {
'test/*.js': ['webpack']
},
singleRun: true,
@sagalbot
sagalbot / gulpfile.js
Last active April 13, 2018 05:03
Laravel Elixir + Vueify + Hot Reload. This will get you up and running with Browserify HMR + Vueify + BrowserSync in no time.
var elixir = require('laravel-elixir');
var gutil = require('gulp-util');
// If 'gulp watch' is run
if (gutil.env._.indexOf('watch') > -1) {
// Enable watchify for faster builds
elixir.config.js.browserify.watchify.enabled = true