Skip to content

Instantly share code, notes, and snippets.

@claycarpenter
claycarpenter / gulpfile.js
Last active August 23, 2018 15:35
Gulp build script with Sass, Jade, BrowserSync integration.
// Define project paths.
// Note: all of these are relative to the project root.
var projectPaths = {
scssSources: 'src/scss',
outputRoot: 'output'
};
// Import required dependencies.
var gulp = require('gulp'),
browserSync = require('browser-sync'),
/*!
Copyright 2015 Initech
This will always be present, no matter the output style.
*/
/*
Multi-line comment.
This will be present in all output styles other than compressed.
@claycarpenter
claycarpenter / build.js
Created May 23, 2015 20:35
Test of wrapped metalsmith-browser-sync plugin.
#!/usr/bin/env node
var Metalsmith = require('metalsmith'),
browserSync = require('metalsmith-browser-sync');
// Hard-coded value. In more complex scripts, this value is read from
// CLI args.
var isWatchEnabled = true;
var browserSyncOptions = {
@claycarpenter
claycarpenter / package.json
Created May 19, 2015 00:23
Module Referencing Deps via Git URLs
{
"name": "git-urls-test",
"version": "1.0.0",
"dependencies": {
"gist-minimum-module": "git+https://gist.github.com/15b5e6c8762342a8ce38.git",
"github-minimum-module": "git+https://github.com/claycarpenter/github-minimum-module.git"
},
"license": "ISC"
}
@claycarpenter
claycarpenter / package.json
Last active August 29, 2015 14:21
Module Referencing Deps via Git Shorthands
{
"name": "git-shorthands-test",
"version": "1.0.0",
"dependencies": {
"gist-minimum-module": "gist:15b5e6c8762342a8ce38",
"github-minimum-module": "github:claycarpenter/github-minimum-module"
},
"license": "ISC"
}
@claycarpenter
claycarpenter / package.json
Last active August 29, 2015 14:21
Minimal Node Module
{
"name": "gist-minimum-module",
"version": "0.0.7"
}
@claycarpenter
claycarpenter / index.js
Created May 8, 2015 00:30
Stash of metalsmith-browser-sync plugin update
var _ = require('lodash');
var browserSync = require('browser-sync').create();
var debug = require('debug')('metalsmith-browser-sync');
var isBrowserSyncRunning = false;
function browserSyncPlugin(options){
function plugin(files, metalsmith, done) {
if (isBrowserSyncRunning) {
// BrowserSync is already running, mark done without starting
@claycarpenter
claycarpenter / external-template.html
Created May 7, 2015 23:06
Minimal HTML 5 Templates
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta charset="utf-8">
<title></title>
<link rel="stylesheet" href="styles.css">
</head>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<h1>Lorem Ipsum Title Sit Amet</h1>
<p>Support collaborative catalyst Rosa Parks; criteria; compassion; social entrepreneurship citizenry change movements. Revitalize opportunity insurmountable challenges stakeholders cause institutions, healthcare; Arab Spring enabler. Asylum combat poverty cooperation, implementation research proper resources human experience sustainable future educate partnership The Elders.
</p>
@claycarpenter
claycarpenter / .bashrc
Last active August 29, 2015 14:16
cloud9.bashrc
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
. /etc/apache2/envvars
# If not running interactively, don't do anything else
[ -z "$PS1" ] && return
# don't put duplicate lines or lines starting with space in the history.