This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| import requests | |
| import sys | |
| import json | |
| import re | |
| if len(sys.argv) == 2: | |
| markdown_file = sys.argv[1] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| # Copyright 2012 Rackspace | |
| # Copyright 2013 Matt Martz | |
| # All Rights Reserved. | |
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); you may | |
| # not use this file except in compliance with the License. You may obtain | |
| # a copy of the License at | |
| # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # nginx Embedded Perl module for adding a Content-MD5 HTTP header | |
| # | |
| # This perl module, will output an MD5 of a requested file using the | |
| # Content-MD5 HTTP header, by pulling the hex hash from a file of the | |
| # same name with .md5 appended to the end, if it exists. | |
| # | |
| # Author: Matt Martz <matt@sivel.net> | |
| # Link: https://gist.github.com/1870822#file_content_md5_req_dot_md5.pm | |
| # License: http://www.nginx.org/LICENSE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| if ( defined( 'SAVEQUERIES' ) && SAVEQUERIES ) | |
| add_action( 'wp_footer', 'the_queries' ); | |
| function the_queries() { | |
| global $wpdb; | |
| if ( defined( 'LOGQUERIES' ) && LOGQUERIES ) { | |
| foreach ( $wpdb->queries as $query ) | |
| error_log( trim( $query[0] ) . "\n", 3, WP_CONTENT_DIR . '/debug.log' ); | |
| } else { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| TAGSURL='http://core.svn.wordpress.org/tags/' | |
| STABLETAG=`curl -s $TAGSURL | awk -F '">' '{print $2}' | awk -F"/<" '{print $1}' | egrep "^[0-9].[0-9]" | sort -n | tail -n 1` | |
| if [ $STABLETAG == '' ] | |
| then | |
| echo "Stable tag not found, exiting..." | |
| exit 1 | |
| fi | |
| for ADDON in `ls -1d /home/user/sites/*/` | |
| do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /* | |
| Plugin Name: Better Cache Bust | |
| Plugin URI: http://sivel.net/ | |
| Description: Moves the resource version in the URL path instead of as a query var | |
| Version: 1.0 | |
| Author: Matt Martz | |
| Author URI: http://sivel.net/ | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /* | |
| This PHP script will function as a URL Shortening endpoint for Google Apps | |
| Short Links. | |
| Copyright (C) 2010 Matt Martz <matt@sivel.net> (http://sivel.net/) | |
| This program is released under the GNU General Public License version 2 | |
| http://www.gnu.org/licenses/gpl-2.0.txt | |
| This program is free software; you can redistribute it and/or |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /* | |
| Plugin Name: Sivel CDN | |
| Plugin URI: http://sivel.net/ | |
| Description: Points media urls at a CDN | |
| Version: 1.0 | |
| Author: Matt Martz | |
| Author URI: http://sivel.net/ | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/python | |
| import urllib, re, sys | |
| def content_match(url, match, nocase): | |
| uh = urllib.urlopen(url) | |
| if re.search(match, uh.read(), re.I if nocase else 0) and uh.getcode() == 200: | |
| return [True, uh.geturl(), uh.getcode()] | |
| else: | |
| return [False, uh.geturl(), uh.getcode()] |