Skip to content

Instantly share code, notes, and snippets.

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
View gist:1125158
$m->classe('X')->devient('Y')
->attribut('A')
->attribut('B')
->attribut('C1')->devient('C2')
->attribut('D1')->sentoureDe('h2')->vaDans('D')
->attribut('D2')->sentoureDe('h3')->vaDans('D')
@charlycoste
charlycoste / sample.dot
Last active Sep 26, 2015
UML diagram sample with dot (graphviz)
View sample.dot
digraph G {
node [shape = "record"]
edge [arrowhead = "empty"]
Animal [label = "{Animal|+ name : string\l+ age : int\l|+ die() : void\l}"]
}
@charlycoste
charlycoste / Makefile
Created Dec 14, 2012
Makefile for eZ Publish
View Makefile
cache:
php bin/php/ezcache.php --clear-all --purge
autoloads:
php bin/php/ezpgenerateautoloads.php
View my_query.php
<?php
class My\Query extends Query
{
$this->criterion = new Criterion\LogicalAND(
array(
new Criterion\Subtree( $root->pathString ),
new Criterion\ContentTypeId( $ids ),
new Criterion\Visibility( Criterion\Visibility::VISIBLE )
)
);
@charlycoste
charlycoste / ez-bookmarks-to-user-subnodes.php
Created Jan 6, 2013
Makes User objects as containers and move all articles bookmarks to users subnodes.
View ez-bookmarks-to-user-subnodes.php
<?php
$output = new ezcConsoleOutput();
$options = array(
'successChar' => $output->formatText( '+', 'success' ),
'failureChar' => $output->formatText( '-', 'failure' ),
);
$status = new ezcConsoleStatusbar( $output, $options );
$script = eZScript::instance();
@charlycoste
charlycoste / menu.html
Last active Dec 10, 2015
Responsive menu system with media queries
View menu.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title></title>
<link href="style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<ul>
<li><a href="#"><span>Item 1</span></a></li>
<li><a href="#"><span>Item 2</span></a></li>
View form.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title></title>
<link href="style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form method="post" action="/">
<fieldset>
<legend>Login</legend>
View dropmenu.js
$("dt").toggle( function(){$(this).nextAll().show()},
function(){$(this).nextAll().hide()})
.nextAll().hide();
View ezjscserverfunctionsjs.php
<?php
//
// Definition of ezjscServerFunctionsJs class
//
// Created on: <16-Jun-2008 00:00:00 ar>
//
// ## BEGIN COPYRIGHT, LICENSE AND WARRANTY NOTICE ##
// SOFTWARE NAME: eZ JSCore extension for eZ Publish
// SOFTWARE RELEASE: 4.3.0
// COPYRIGHT NOTICE: Copyright (C) 1999-2010 eZ Systems AS
View scroll.js
// see http://www.creativejuiz.fr/blog/tutoriels/jquery-effet-smooth-scroll-defilement-fluide
$('a[href^="#"]').click(function(){
var the_id = $(this).attr("href");
$('html, body').animate({
scrollTop:$(the_id).offset().top
}, 'slow');
return false;
});