Skip to content

Instantly share code, notes, and snippets.

View charlycoste's full-sized avatar
🏃‍♂️
migrated to my own gitlab and gitlab.com #ByeMicrosoft

Charles-Édouard Coste charlycoste

🏃‍♂️
migrated to my own gitlab and gitlab.com #ByeMicrosoft
View GitHub Profile
<?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;
<?php
class Table
{
private $name;
public function __construct( $name )
{
$this->name = $name;
}
# 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
(->
FadeTransitionRegion = Backbone.Marionette.Region.extend
show: (view)->
@ensureEl()
view.render()
@close ->
return if @currentView and @currentView isnt view
@currentView = view
<?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
@charlycoste
charlycoste / geekkoder.html
Last active July 10, 2019 06:06
a Geek code decoder
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Geek Koder</title>
<script>
/**
* @description Geek Code Decoder (originally written Extension for Firefox )
* @author Bhasker V Kode
* @date hacked up in the early hours of Feb 23,2007 .
@charlycoste
charlycoste / ancestors.sql
Last active December 21, 2015 22:59
Fetches all fields of all ancestors for the node 267 (works only with postgresql)
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
%form{ :method=>'post', :action=>$action }
%h1.maincontentheader = $title
- foreach ($warnings as $warning)
.warning[$warning]
%h2 = $warning->message
%ul
%li = $warning->hint
- foreach ($fields as $field)
<?php
/**
* ezpMobileDeviceRegexpFilter but with no redirection
*/
class ezpMobileDeviceRegexpFilterWithoutRedirection extends ezpMobileDeviceRegexpFilter
{
/**
* A redirect function which don't redirect
*/
public function redirect(){}
<?php
class ezcMvcXsltViewHandler implements ezcMvcViewHandler
{
/**
* Contains the template object
*
* @var XSLTProcessor
*/
protected $template;