Skip to content

Instantly share code, notes, and snippets.

View manbearwolf's full-sized avatar
🌴
On vacation

Matt Bott manbearwolf

🌴
On vacation
View GitHub Profile
var gulp = require('gulp');
var sass = require('gulp-sass');
var concat = require('gulp-concat');
var uglify = require('gulp-uglify');
var minify = require('gulp-minify-css');
var assets = {
'js': [
"bower_components/jquery/dist/jquery.js",
"bower_components/highlightjs/highlight.pack.js",
@manbearwolf
manbearwolf / example.html
Created September 20, 2017 18:45 — forked from evansims/example.html
Embedding or sharing a image or photo uploaded to Google Drive.
<a href="https://drive.google.com/uc?export=view&id=XXX"><img src="https://drive.google.com/uc?export=view&id=XXX" style="width: 500px; max-width: 100%; height: auto" title="Click for the larger version." /></a>
@manbearwolf
manbearwolf / carousel-example.css
Created September 5, 2017 14:31 — forked from Swivelgames/carousel-example.css
Simple JavaScript Carousel
@manbearwolf
manbearwolf / gist:aa3750aa410afa71dfac9ff85f89eb0c
Created September 4, 2017 13:34 — forked from kezzbracey/gist:6758471
Aligning images in markdown / Ghost post editor.
<!--To center an image-->
<p align="center">
![alt]()
</p>
<!--To right align an image-->
<p align="right">
![alt]()
</p>
@manbearwolf
manbearwolf / .readme.md
Created August 19, 2017 22:33 — forked from jmyrland/.readme.md
Off canvas menu with touch handles.

Off canvas menu with touch handles.

View an example here.

This example is based on elements of this post.

Incliudes a OffCanvasMenuController to handle touch events bound to the off canvas menu. For example when swiping from the outer left side to the right, the left off canvas menu is dragged along.

Example usage

@manbearwolf
manbearwolf / 01-before.html
Created August 14, 2017 16:32 — forked from mikeygee/01-before.html
truncate blog posts in jekyll
<!-- using the truncate filter -->
{% for post in site.posts limit:10 %}
<h2><a href="{{ post.url }}">{{ post.title }}</a></h2>
<span class="post-date">{{ post.date | date: "%B %d, %Y" }}</span>
{% if post.content.size > 2000 %}
{{ post.content | truncatewords: 300 }} <!-- bad! content gives you rendered html and you will truncate in the middle of a node -->
<a href="{{ post.url }}">read more</a>
{% else %}
{{ post.content }}
{% endif %}