This file contains 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 | |
/** | |
* @package Habari | |
* | |
*/ | |
/** | |
* Handles Ajax requests, sending them to plugin sinks. | |
* | |
*/ |
This file contains 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
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] |
This file contains 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 | |
# 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 |
This file contains 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
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 |
This file contains 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
$cronurl = URL::get( 'cron', | |
array( | |
'time' => $run_time, | |
'asyncronous' => Utils::crypt( Options::get( 'GUID' ) ) ) | |
); | |
$request = new RemoteRequest( $cronurl, 'GET', 100 ); | |
$request->execute(); |
This file contains 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 php | |
<?php | |
/** | |
* Here we fake a request. set these values appropriate to your | |
* Habari install. | |
* | |
* HABARI_PATH is the full file path to the habari install. | |
* HABARI_SERVER_NAME is the name (domain) of your habari install. | |
* HABARI_REQUEST_URI is the URL path to your Habari install. "/" for root. |
This file contains 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
Apple-PubSub | |
AppleSyndication | |
Ask Jeeves/Teoma | |
Baiduspider | |
bingbot | |
Bloglines | |
BuzzTracker | |
Charlotte | |
DoCoMo | |
Exabot |
This file contains 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
var easterEggKeys = new Array('j','i','b','b','y'); | |
var easterEggCurrent = 0; | |
$(window).keydown(function(e){ | |
var key = String.fromCharCode(e.keyCode).toLowerCase(); | |
if (easterEggKeys[easterEggCurrent].toLowerCase() == key) { | |
easterEggCurrent++; | |
if (easterEggCurrent >= easterEggKeys.length) { | |
$('body').append('<embed src="http://mattread.com/examples/midi/sinfon1.mid" autostart="true" hidden="true" type="audio/midi">'); | |
for (var i = 0; i < document.styleSheets.length; i++) { document.styleSheets[i].disabled = true; } |
This file contains 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
diff --git a/twitterlitte.plugin.php b/twitterlitte.plugin.php | |
index 8da3d97..900738f 100644 | |
--- a/twitterlitte.plugin.php | |
+++ b/twitterlitte.plugin.php | |
@@ -63,7 +63,7 @@ class TwitterLitte extends Plugin | |
), '', '&' ); | |
} | |
else { | |
- $url = 'http://twitter.com/statuses/user_timeline/' . $block->username . '.json'; | |
+ $url = 'http://api.twitter.com/1/statuses/user_timeline.json?screen_name=' . $block->username; |
This file contains 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 | |
public function filter_comment_content_out($content, $comment) { | |
if (!preg_match_all('#(@[0-9a-zA-Z_]+)\b#i', $content, $matches, PREG_SET_ORDER)) { | |
return $content; | |
} | |
$id = null; | |
foreach ( $matches as $m ) { | |
foreach($comment->post->comments as $com) { |