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 | |
// recursive delete function | |
$unlink = function($path) use (&$unlink) { | |
if (is_file($path)){ | |
return unlink($path); | |
} | |
if (is_dir($path)) { |
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 searching = false; | |
var search_string = ''; | |
$('#courseSearch').keyup( | |
function(){ | |
if (this.value.length > 2) { | |
if (search_string != this.value) { | |
search_string = this.value; | |
clearTimeout(searching); | |
WDN.jQuery('#courseSearchResults').html('<img src="/wdn/templates_3.0/css/header/images/colorbox/loading.gif" alt="Loading search results" />'); |
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
// XMLHTTP JS class is is developed by Alex Serebryakov (#0.9.1) | |
// For more information, consult www.ajaxextended.com | |
// What's new in 0.9.1: | |
// - fixed the _createQuery function (used to force multipart requests) | |
// - fixed the getResponseHeader function (incorrect search) | |
// - fixed the _parseXML function (bug in the ActiveX parsing section) | |
// - fixed the _destroyScripts function (DOM errors reported) | |
proxy_xmlhttp = function() { |
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
<?xml version="1.0" encoding="UTF-8" ?> | |
<p xmlns="http://pear.php.net/dtd/rest.package" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xmlns:xlink="http://www.w3.org/1999/xlink" xsi:schemaLocation="http://pear.php.net/dtd/rest.package http://pear.php.net/dtd/rest.package.xsd"> | |
<n>ConsoleTools</n> | |
<c>components.ez.no</c> | |
<ca xlink:href="/Chiara_PEAR_Server_REST/c/Commandline">Commandline</ca> | |
<l>New BSD</l> | |
<s>A set of classes to do different actions with the console.</s> | |
<d>A set of classes to do different actions with the console (also called shell). |
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
g=`find ~/workspace/ -name .git -maxdepth 2` | |
for repo in ${g[@]} | |
do | |
cd ${repo} | |
cd .. | |
echo `pwd` | |
git pull | |
done |
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 | |
if (!isset($_POST['delete'])) { | |
return false; | |
} | |
if (UNL_ENews_Controller::getUser()->uid !== $story->uid_created) { | |
throw new Exception('You did not create that story - you can not delete it', 403); | |
} |
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
for dir in `ls -1 */.svn/entries | xargs grep -H -l svn.php.net | grep -E -o "^[^\/]+"`; do | |
svn switch --relocate `svn info $dir | grep ^Repository\ Root | cut -f 3 -d ' '` `svn info $dir | grep ^Repository\ Root | cut -f 3 -d ' ' | sed 's/http:/https:/'` $dir | |
done |
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 | |
require_once __DIR__ . '/vendor/php/PEAR2/Autoload.php'; | |
// Setup the local source dir | |
PEAR2\Autoload::initialize(__DIR__ . '/src'); | |
// Setup the Pyrus_Developer checkout | |
PEAR2\Autoload::initialize(__DIR__ . '/../Pyrus_Developer/src'); |
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 | |
class Router | |
{ | |
protected static $routes = array(); | |
public static function route($requestURI, $options = array()) | |
{ | |
if (!empty($_SERVER['QUERY_STRING'])) { | |
$requestURI = substr($requestURI, 0, -strlen(urldecode($_SERVER['QUERY_STRING'])) - 1); |
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
The following is an email I sent to the PEAR Group on March 18th 2011. | |
Today I floated the idea of migrating PEAR(1) packages to git after hearing about more and more projects that have seen an increase in contributions once moving their code to a more social environment (github). | |
Right now we have three accounts, http://github.com/pear, http://github.com/pear2, and http://github.com/pyrus — each are organizations which can have teams of developers with push access to repositories (see how PEAR2 is configured if you're interested in checking it out). | |
I would like to first endorse migrating to github as an option for pear packages. Then after some feedback from more developers perhaps migrate more packages. | |
Below are the details on how I moved all of the PEAR2 base components to github. This process is something that can be scripted if necessary. |
OlderNewer