Skip to content

Instantly share code, notes, and snippets.

@pathawks
pathawks / Change Author.sh
Last active December 20, 2015 19:59 — forked from jeresig/gist:199298
Change author information in past commits
#!/bin/sh
# Rename an email address in all old commits.
# WARNING: Will change all your commit SHA1s.
git filter-branch -f --env-filter '
an="$GIT_AUTHOR_NAME"
am="$GIT_AUTHOR_EMAIL"
cn="$GIT_COMMITTER_NAME"
cm="$GIT_COMMITTER_EMAIL"
<?php /* With apologies to Dr. Drang and John Siracusa.
feed-subscribers.php
By Marco Arment.
Released into the public domain with no warranties and no restrictions.
Usage: Pipe an Apache access log into stdin, e.g.:
php -f feed-subscribers.php < /var/log/httpd/access_log
@pathawks
pathawks / YouTube Embed for Jekyll.md
Last active December 15, 2015 18:19 — forked from joelverhagen/README.md
Jekyll plugin to embed YouTube videos

This is a plugin meant for Jekyll.

Example use:

Easily embed a YouTube video. Just drop this file in your _plugins directory.

{% youtube oHg5SJYRHA0 %}
<?php
/*
* WHAT DOES THIS CODE DO?
*
* When using get_adjacent_post(), there is no way to restrict posts to one or two
* categories, if the categories in question are not identical to the current post.
* We get arround that by requesting a list of EVERY CATEGORY EXCEPT the one in
* question, and then pass that as our list of 'excluded' categories.
*
* Take a deep breath.
@pathawks
pathawks / Jekyll sitemap.md
Last active September 27, 2015 22:28 — forked from metaskills/jekyll_sitemap.markdown
Jekyll sitemap.xml

Jekyll Sitemap

The best way to add a sitemap to a Jekyll site is with the jekyll-sitemap plugin.

In your _config.yml

gems:
- jekyll-sitemap