Skip to content

Instantly share code, notes, and snippets.

Jayson Harshbarger Hypercubed

Block or report user

Report or block Hypercubed

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Hypercubed
Hypercubed / README.md
Last active Apr 2, 2019
DocPad: rsync Deploy Script
View README.md

DocPad: rsync Deploy Script

  • Place deploy.sh in {docpad folder}/bin/
  • Create (or edit) a .env file in your docpad folder with the following values:
#!/bin/bash
DEPLOY_SOURCE_DIR="out/"
DEPLOY_DEST_DIR="~/public_html/"
DEPLOY_SERVER=deploy-server-name
@Hypercubed
Hypercubed / gist:6547962
Created Sep 13, 2013
Remove first prefix from filename
View gist:6547962
for file in *;
do
mv "$file" "${file#*.}"
done
@Hypercubed
Hypercubed / README.md
Last active Mar 31, 2016
Drafting and publishing a blog post (in docpad) using [frontman](https://github.com/Hypercubed/frontman)
View README.md

Drafting and publishing a blog post (in docpad) using frontman

Create a new blog post:

$  frontman new.html.md -t src/templates/draft_post.cson -o .
info:    Writing  [...]\src\drafts\new.html.md
It's saved!

Publishing blog post:

@Hypercubed
Hypercubed / Gruntfile.js
Last active Dec 7, 2017
DocPad is great.... but so is Grunt. Use grunt-contrib-connect and grunt-contrib-watch instead of docpad's server and watcher.
View Gruntfile.js
'use strict';
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
docpad: {
files: [ "./src/**/*.*" ],
out: ["out"]
},
watch: {
@Hypercubed
Hypercubed / markdown.js
Created Dec 18, 2013
Improved angularjs markdown provider/filter/directive
View markdown.js
/*
* angular-markdown-directive v0.1.0
* (c) 2013 J. Harshbarger
* License: MIT
*/
/*
Provider usage:
app.config(['markdownProvider', function(markdownProvider) {
View marked.js
/*
* angular-marked-directive v0.0.1
* (c) 2013 J. Harshbarger
* License: MIT
*/
/*
Config:
app.config(['marked', function(marked) {
@Hypercubed
Hypercubed / cite.js
Last active Aug 29, 2015
Simple mechanism to link citation references with citation notes.
View cite.js
/* Author: J. Harshbarger
Simple mechanism to link citation references with citation notes. This code will do two things:
1) Highlight a citation note (actually just add the `highlight` class to the parent) when a citation reference or note is clicked.
2) Citation note text (the anchors parent) is added to each citation reference as a popover.
Citation notes and references are linked using standard HTML has linking using the anchor tag. For both the citation note and citation reference the parent of the link is important. For example:
```js
View angular-pageslide-directive.css
.ng-pageslide {
z-index: 1000;
position: fixed;
width: 0;
height: 0;
-moz-transition-property: width, height; /* Firefox 4 */
-webkit-transition-property: width, height; /* Safari and Chrome */
-o-transition-property: width, height; /* Opera */
transition-property: width, height;
-webkit-transition-duration: 0.5s; /* Safari */
@Hypercubed
Hypercubed / .gitignore
Last active Aug 29, 2015
PowerArray vs....
View .gitignore
node_modules/
@Hypercubed
Hypercubed / .gitignore
Last active Aug 29, 2015
PowerArray benchmarks
View .gitignore
node_modules/
You can’t perform that action at this time.