Skip to content

Instantly share code, notes, and snippets.

@codegaze
codegaze / titlecase_jekyll_titles.js
Created Jun 14, 2020
TitleCase Jekyll Titles With Node
View titlecase_jekyll_titles.js
const path = require('path');
const fs = require('fs');
const directoryPath = path.join(__dirname, '_posts');
// Loop through the folder's files
fs.readdir(directoryPath, (err, files) => {
if (err) {
return console.log('Unable to scan directory: ' + err);
}
// Loop through all files
View gist:cbd057de87ed79bbd40e2eb89498d79d
/(19|20)\d{2}\/(0[1-9]|1[012])\/(0[1-9]|[12][0-9]|3[01])/
@codegaze
codegaze / gulpfile.js
Last active Nov 20, 2016 — forked from alexjlockwood/gulpfile.js
Example of working around gulpfile.js error in this blog post: https://codegaze.github.io/2016/01/09/a-jekyll-workflow-with-gulp/
View gulpfile.js
// Require all the things
var gulp = require('gulp'),
sass = require('gulp-sass'),
gutil = require('gulp-util'),
plumber = require('gulp-plumber'),
rename = require('gulp-rename'),
minifyCSS = require('gulp-clean-css'),
prefixer = require('gulp-autoprefixer'),
connect = require('gulp-connect'),
cp = require('child_process');
@codegaze
codegaze / vhosts.sublime-snippet
Last active May 8, 2016
Snippet for Sublime Text to add a domain to your vhosts (XAMPP & Laravel presets)
View vhosts.sublime-snippet
<snippet>
<content><![CDATA[
<VirtualHost ${1:domain_name}:80>
DocumentRoot "C:/xampp/htdocs/${1:domain_name}/public"
ServerName ${1:domain_name}
ErrorLog "logs/${1:domain_name}-error.log"
<Directory "${1:domain_name}">
Options Indexes FollowSymLInks
AllowOverride all
Deny from all
@codegaze
codegaze / SassMeister-input.scss
Created Sep 29, 2015
Generated by SassMeister.com.
View SassMeister-input.scss
// ----
// libsass (v3.2.5)
// ----
// ----
// libsass (v3.2.5)
// ----
@codegaze
codegaze / SassMeister-input.scss
Last active Aug 29, 2015
Generated by SassMeister.com.
View SassMeister-input.scss
// ----
// libsass (v3.2.5)
// ----
// ----
// libsass (v3.2.5)
// ----