Skip to content

Instantly share code, notes, and snippets.

View jhyland87's full-sized avatar

J jhyland87

View GitHub Profile
@jhyland87
jhyland87 / index.js
Created November 8, 2016 18:43
Metalsmith Example
const Metalsmith = require('metalsmith')
const collections = require('metalsmith-collections')
const markdown = require('metalsmith-markdown')
const layouts = require('metalsmith-layouts')
const permalinks = require('metalsmith-permalinks')
const tidy = require('metalsmith-html-tidy')
const debug = require('metalsmith-debug')
const models = require('metalsmith-models')
const within = require('metalsmith-handlebars-within')
@jhyland87
jhyland87 / MakeFile
Created November 9, 2016 16:24
MakeFile example
# MAKEFILE CONTENTS
$ cat Makefile
define say_something
echo "You said "$(1)
endef
all: test_b
echo "This is all"
$(call say_something, FOO)
$(call say_something, BAR)
'use strict'
/**
* @title Lodash Mixins aka flat-line
* @description Extra useful Lodash mixins
* @requires lodash, crypto, ./data.js
*
* Note: A few of the mixins were originally from phpjs.org methods, and were modified to use some of the lodash methods,
* and to work as a mixin with the other methods. Also, they may have been optimized a bit, as they may have originally
* been created some time ago. The methods that were originally from phpjs.org are: utf8Encode, utf8Decode and sha1.
'use strict'
const _ = require( '../' )
const Code = require('code')
const Async = require('async')
const Lab = require('lab')
const lab = exports.lab = Lab.script()
const suite = lab.suite
const it = lab.test
<!DOCTYPE html>
<html lang="en-US" class="no-js">
<head>
<!-- Begin Meta Tags -->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0">
<meta name="description" content="Responsive One Page Vcard Portfolio or Resume Template"/>
<meta name="author" content="TheThemeLab">
<!-- End Meta Tags -->
doctype html
html(ang="en-US", class="no-js")
head
// Begin Meta Tags
meta(http-equiv="Content-Type", content="text/html; charset=utf-8")
meta(content="width=device-width, user-scalable=no, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0")
meta(name="description",content="Responsive One Page Vcard Portfolio or Resume Template")
meta(name="author",content="TheThemeLab")
// End Meta Tags
doctype html
html(lang='en-US')
head
meta(charset='UTF-8')
meta(name='viewport', content='width=device-width, initial-scale=1, maximum-scale=1')
title ShiftCV
link(rel='shortcut icon', type='image/x-icon', href='images/favicon.ico')
link(rel='stylesheet', type='text/css', media='all', href='style/style.css')
link(rel='stylesheet', type='text/css', media='all', href='style/responsive.css')
//if lt IE 9
//-
Hotizontal Line Drawer Thingy
@param {string} caption Caption to display
@param {number} size Width of horiontal line
@example
// Basic Example
+ divider('Main Header')
// <div class="row new-line-clearfix">
#!/usr/bin/env python
import config
import string
import sys
reload(sys)
sys.setdefaultencoding("utf-8")
class BaseServer(Lockable):
# -------------------------------------------------
# File: source/head.md
---
title: head
layout: head.pug
teststring: testvalue
---
(File: head.md) When viewing hello-world.html, you'll see this sentence, but no rendered data from head.pug