Skip to content

Instantly share code, notes, and snippets.

View budparr's full-sized avatar
🎯
Focusing

Bud Parr budparr

🎯
Focusing
View GitHub Profile
@timwco
timwco / gist:1020229
Created June 11, 2011 03:44
Custom Icon in Wordpress Admin
<?php
function as_custom_logo() {
echo '
<style type="text/css">
#header-logo { background-image: url('.get_bloginfo('template_directory').'/images/myIcon.png) !important; }
</style>
';
}
@samargulies
samargulies / oembed-hotfix.php
Created October 13, 2011 17:09
Vimeo oembed hotfix
<?php
/*
Plugin Name: Vimeo oembed hotfix
Plugin URI:
Description: Enable https vimeo embeds. <strong>Note</strong>: If for any reason videos are not embedding properly, simply deactivate, and then reactivate this plugin.
Author: gluten
Version: 2.0
Author URI: http://belabor.org/
*/
@paulirish
paulirish / gist:1445367
Created December 7, 2011 23:55
barackobama.com's css
@charset "utf-8";
html, body, body div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, abbr, address, cite, code, del, dfn, em, img, ins, kbd, q, samp, small, strong, sub, sup, var, b, i, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, figcaption, figure, footer, header, hgroup, menu, nav, section, summary, time, mark, audio, video
{ margin: 0; padding: 0; border: 0; font-size: 100%; vertical-align: baseline; }
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section
{ display: block }
blockquote, q { quotes: none }
@leviwheatcroft
leviwheatcroft / gist:d57777ed9d49a9a285a9
Last active October 10, 2015 00:24
guide to creating / configuring kestonejs heroku projects

overview

objectives

  • create a project we can develop locally and then push to heroku
  • automate deployment as much as is practical
  • avoid storing built resources in master branch
  • avoid storing development npm modules in production
  • configure the project to behave appropriately in each environment
@semireg
semireg / gist:7493380
Last active December 28, 2015 11:29
Using jekyll for a website with two-levels of navigation. This is one step closer to dynamic front-matter.

_data/nav.yml

LabelScope:
  alt: Tour
  subdirs:
    - Download
    - Support
    - Printers

MASS:
@curtisblackwell
curtisblackwell / README.md
Last active January 2, 2016 01:38
Statamic Suggest Hack

Statamic Suggest Hack

This is a hack on Statamic's Suggest fieldtype to allow options to be passed in via a separate file. This way global variables can populate the options.

Usage

Paste the code from ft.suggest.hack.php into cp/fieldtypes/suggest/ft.suggest.php after the "Hardcoded list of options" section.

In your fieldset, do something like this:

brand:

display: Brand

@dhcole
dhcole / profile.md
Last active January 19, 2016 10:07
Profiling the `jekyll new` site
posts seconds time
1 0.824 0:0.824
100 2.644 0:2.644
1000 25.071 0:25.071
5000 186.715 3:6.715
10000 536.904 8:56.904

chart

@roobottom
roobottom / jekyll-get-date-from-filename.js
Last active February 11, 2016 02:14
This file will read a bunch of Jekyll formatted `.md` posts in a folder, grab the date from the filename and write it into the front-matter. Files are copied to a new folder, rather than overwritten.
/*
This file will read a bunch of Jekyll formatted `.md` posts in a folder,
grab the date from the filename and write it into the front-matter.
Files are copied to a new folder, rather than overwritten.
Requirements: `npm install lodash`, and that's it!
*/
var fs = require('fs'),
@frontendbeast
frontendbeast / gist:7188558
Last active March 5, 2016 13:53
Craft CMS future events listings, sorted by date and grouped by month and year. Requires Danny Nimmo's SortByField plugin. https://github.com/dannynimmo/craftcms-sortbyfield
{% set allEvents = craft.entries.section('events').find() %}
{% set futureEvents = [] %}
{% for event in allEvents %}
{% if event.startDate | date('U') >= 'now' | date('U') %}
{% set futureEvents = futureEvents | merge([event]) %}
{% endif %}
{% endfor %}
{% for date, events in futureEvents | sortByField('startDate') | group('startDate|date("F Y")') %}