Skip to content

Instantly share code, notes, and snippets.

$cronurl = URL::get( 'cron',
array(
'time' => $run_time,
'asyncronous' => Utils::crypt( Options::get( 'GUID' ) ) )
);
$request = new RemoteRequest( $cronurl, 'GET', 100 );
$request->execute();
https://www.google.ca/search?hl=en&tbo=d&output=search&sclient=psy-ab&q=Amore+Grand+Piano&btnI=
GET /search?hl=en&tbo=d&output=search&sclient=psy-ab&q=Amore+Grand+Piano&btnI= HTTP/1.1
Host: www.google.ca
User-Agent: Mozilla/5.0 (Windows NT 6.0; rv:17.0) Gecko/20100101 Firefox/17.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
DNT: 1
Connection: keep-alive
#!/bin/bash
# setup tmp files from tar.gz's
cd /home/matt/habari-locales/bzr/
bzr merge
bzr add locale/*
bzr commit -m "lp sync"
cd ../
# check fo .po
RewriteEngine On
RewriteRule ^(archives|blog)/[0-9]+/[0-9]+/(.+)$ $2 [R=301,L]
RewriteRule ^(2005|2004|2006)/[0-9]+/(.+)$ $2 [R=301,L]
RewriteRule ^(css/flag\.php)$ examples/$1 [R=301,L]
RewriteRule ^(projects)/(.+) http://drunkenmonkey.org/$2 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteBase /
RewriteRule . index.php [PT]
<?php
/**
* @package Habari
*
*/
/**
* Handles Ajax requests, sending them to plugin sinks.
*
*/
@MattRead
MattRead / gist:3491900
Created August 27, 2012 20:16
providers
<?php
class Providers extends Plugin {
/**
*
*/
public function filter_admin_access( $access, $page, $post_type ) {
if ( $page != 'providers' ) {
return $access;
<?php
public function filter_post_content_out_1($content, $post) {
if (strpos($content, '<!--break-->') !== false){
$pages = explode('<!--break-->', $content);
$page = Controller::get_var('page', 1) - 1;
if ( array_key_exists($page, $pages) ) {
return $pages[$page];
}
}
return $content;
I'm Matt Read, a 32 year old male from Ottawa, Canada. That's the capital of Canada for all you who don't know that already. I enjoy skateboarding, playing hockey and soccer, and working on my website.
<img src="/user/themes/greeny/images/BigJibby.jpg" alt="A picture of me" style="float:right;" /> My favourite TV show of all time is MacGyver, and Good Will Hunting is my favorite movie. I program in PHP, MySQL, Javascript, and Bash Scripting, and I love playing with Python. I'm a bit pedantic about producing **semantic** (X)HTML (and no, valid does not mean semantic).
### About This Site
This site is my personal website since June 2003. This site is powered by Habari. It contains my (almost) daily web log about my life and stuff I find on the Internet. For more information and help in browsing this site, visit the links below.
- [Frequently Asked Questions](/faq)
- [Accessibility Statement](/accessibility)
array(1) {
[0]=>
object(Term)#11 (5) {
["inforecords":protected]=>
NULL
["fields":protected]=>
array(6) {
["id"]=>
string(3) "218"
["term"]=>
object(Terms)#18 (1) {
["storage":"ArrayObject":private]=>
object(Terms)#171 (1) {
["storage":"ArrayObject":private]=>
array(1) {
[0]=>
object(Term)#11 (5) {
["inforecords":protected]=>
NULL
["fields":protected]=>