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 | |
include '../../lib/ezc/Base/src/ezc_bootstrap.php'; | |
$imap = new ezcMailImapTransport( "imap.server.fr" ); | |
$imap->authenticate( "login", "pass" ); | |
$imap->selectMailbox( 'INBOX' ); | |
$set = $imap->fetchAll(); | |
$parser = new ezcMailParser(); |
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 | |
/** | |
* This PHP-Class should only read a iCal-File (*.ics), parse it and give an | |
* array with its content. | |
* | |
* PHP Version 5 | |
* | |
* @category Parser | |
* @package Ics-parser | |
* @author Martin Thoma <info@martin-thoma.de> |
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 | |
$api = "https://api.github.com"; | |
$owner = ""; | |
$repo = ""; | |
$issues = json_decode(file_get_contents( "{$api}/repos/{$owner}/{$repo}/issues" )); | |
foreach ($issues as $issue) | |
{ | |
echo "#".$issue->number."\n"; |
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
# import oauth2 | |
import oauth2 as oauth | |
import urlparse | |
# defining endpoints | |
request_token_url = '' | |
authorize_url = '' | |
access_token_url = '' | |
# defining variables |
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 | |
/** | |
* @see http://www.croes.org/gerald/blog/ecrire-un-client-rest-en-php-23/490/ | |
*/ | |
class RestClient | |
{ | |
private $_url; | |
public function setUrl ($pUrl) | |
{ | |
$this->_url = $pUrl; |
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 Table | |
{ | |
private $name; | |
public function __construct( $name ) | |
{ | |
$this->name = $name; | |
} |
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
# Backbone.js 1.0.0 | |
# (c) 2010-2011 Jeremy Ashkenas, DocumentCloud Inc. | |
# (c) 2011-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors | |
# Backbone may be freely distributed under the MIT license. | |
# For all details and documentation: | |
# http:#backbonejs.org | |
(-> |
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
FadeTransitionRegion = Backbone.Marionette.Region.extend | |
show: (view)-> | |
@ensureEl() | |
view.render() | |
@close -> | |
return if @currentView and @currentView isnt view | |
@currentView = view |
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 | |
/** | |
* @author Charles-Edouard Coste | |
* @license http://www.gnu.org/licenses/gpl.html GNU General Public License | |
*/ | |
include_once 'ezc/Base/ezc_bootstrap.php'; | |
$soap_request = <<<EOD |
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
WITH RECURSIVE ezcontentobject_ancestors(node_id, parent_node_id) AS ( | |
SELECT node_id, parent_node_id | |
FROM ezcontentobject_tree | |
WHERE parent_node_id > 0 | |
UNION | |
SELECT parents.node_id, ancestors.parent_node_id | |
FROM ezcontentobject_tree as parents, ezcontentobject_ancestors as ancestors | |
WHERE parents.parent_node_id = ancestors.node_id |