Skip to content

Instantly share code, notes, and snippets.

View budparr's full-sized avatar
🎯
Focusing

Bud Parr budparr

🎯
Focusing
View GitHub Profile
@budparr
budparr / ipad_media_queries
Created March 12, 2012 02:23
iPad media queries
@media only screen and (device-width: 768px) {
/* For general iPad layouts */
}
@media only screen and (min-device-width: 481px) and (max-device-width: 1024px) and (orientation:portrait) {
/* For portrait layouts only */
}
@media only screen and (min-device-width: 481px) and (max-device-width: 1024px) and (orientation:landscape) {
/* For landscape layouts only */
@budparr
budparr / 0_reuse_code.js
Created October 9, 2013 22:47
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
# Location (from root) to save form submissions
submission_save_path: _content/_forms/
# Prefix your files with a string which are saved in the format:
# YYYY-MM-DD-HH-MM-SS.yaml
file_prefix: book-awards
# Prefix your files with a string which are saved in the format:
# YYYY-MM-DD-HH-MM-SS.yaml
# file_suffix: - {{ name }}
{{ if raven:success }}
<h1>Thank You!</h1>
{{ first-name }}
{{ last-name }}
{{ from }}
{{ phone }}
{{ book-title }}
{{ book-publisher }}
{{ author-name }}
@budparr
budparr / jekyll-liquid-series-list
Created November 27, 2013 03:30
copy of realjenius bit of non-plugin liquid code to generate a series of posts https://github.com/realjenius/site-samples/blob/master/2012-11-03-jekyll-series-list/series.html
{% assign count = '0' %}
{% assign idx = '0' %}
{% for post in site.posts reversed %}
{% if post.series == page.series %}
{% capture count %}{{ count | plus: '1' }}{% endcapture %}
{% if post.url == page.url %}
{% capture idx %}{{count}}{% endcapture %}
{% endif %}
{% endif %}
{% endfor %}
@budparr
budparr / jekyll-og-meta-generator
Created April 19, 2014 00:07
Jekyll Open Graph meta-data Generator
<!-- TODO: add og, twitter card -->
{% comment %}
http://ogp.me/
{% endcomment %}
<meta name="description" content="{% if page.tagline %}{{page.tagline}}{% endif %}">
{% if page.categories %}
{% for category in page.categories limit:1 %}
<meta content="{{ category }}" property="article:section">
@budparr
budparr / calendar-for-static-sites.js
Last active August 29, 2015 14:01
A calendar solution for static sites
this is now located at: https://github.com/budparr/jekyll-calendar
// REQUIRES MOMENT.JS AND UNDERSCORE.JS
// This still needs to be templated and cleaned up and commented.
// original idea came from (I think) seattlehacks.com
// you will need to add events via a JSON file
// OR use this YAML to have content people create lists of events https://gist.github.com/budparr/5b21dccf318e723834e9
// use this JSON generator to create JSON for list below https://gist.github.com/budparr/ee901ba06f29cf1db637
var timing = function(start, end) {
@budparr
budparr / static-site-calendar-yaml
Created May 12, 2014 22:02
Use this YAML so content people can easily add event listings. Convert the events into JSON and display using underscore.js and moment.js
-
title:
venue:
address:
city-state:
zip:
website:
allday: true
start: 2014-06-11 18:00:00
end: 2014-06-11 19:30:00
@budparr
budparr / static-site-calendar-json
Created May 12, 2014 22:03
Jekyll JSON generator for calendar
---
layout: none
---
{"events": [{% assign first = true %}
{% for post in site.data.events reversed %}
{% if first == false %},{% endif %}
{% if first == true %}{% assign first = false %}{% endif %}
{
"name" : "{{ post.title }}",
"allday" : "{{ post.allday }}",