Instantly share code, notes, and snippets.

View process-date.js
#!/usr/bin/env node
'use strict'
const fs = require('fs')
const path = require('path')
const matter = require('gray-matter')
const rootPath = path.resolve(__dirname, '../')
const dataPath = path.resolve(rootPath, './src/data/blog')
View MicroState.js
import { Component } from 'react'
export default class MicroState extends Component {
constructor (props) {
super(props)
this.state = props.state
}
render () {
return (this.props.render || this.props.children)({
setState: (...args) => this.setState(...args),
View control.js
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { Map } from 'immutable';
import CMS from 'netlify-cms';
export default class DynamicControl extends React.Component {
constructor(props) {
super(props);
View netlify.toml
# Global settings applied to the whole site.
[build]
publish = "public"
command = "hugo -d public"
[build.environment]
#overwritten by context.production.environment, et. al.
HUGO_VERSION = "0.31"
# The following environments overwrite the global above if you target them.
# The version you use for production
[context.production.environment]
View front-matter.md

This is an example of using the shortcode link-button-sc


A pretty easy button. :)

{{% link-button-sc href="#" class="my-button--raised crazy-button" value="Click Me Real Good" %}}

View settings.json
// Place your settings in this file to overwrite the default settings
{
"editor.fontSize": 16,
"editor.fontFamily": "Consolas",
"editor.tabSize": 2,
"editor.fontLigatures": true,
"editor.wordWrap": "wordWrapColumn",
"editor.wordWrapColumn": 80,
"files.exclude": {
"**/.git": true,
View keybase.md

Keybase proof

I hereby claim:

  • I am talves on github.
  • I am talves (https://keybase.io/talves) on keybase.
  • I have a public key ASD6fOG65lyWkvDm4hBqJdPp7bAXJTF6WkB8h-trFITmrgo

To claim this, I am signing this object:

View SlideData.js
define(function(require, exports, module) {
var SlideData = {
picasaUrl: 'https://picasaweb.google.com/data/feed/api/all',
queryParams: '?kind=photo&q=puppy&max-results=5&imgmax=720&alt=json',
defaultImage: ''
};
SlideData.getUrl = function() {
return SlideData.picasaUrl + SlideData.queryParams;
};
View index.html
<input type="file" id="fileInput" />
<div id="fileDisplayArea"></div>
View index.html
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="Famo.us Video with Attributes" />
<meta charset="utf-8">
<title>Famous App</title>
<meta name="viewport" content="width=device-width, maximum-scale=1, user-scalable=no" />
<meta name="mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />