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
@charlycoste
charlycoste / sample.dot
Last active September 26, 2015 19:38
UML diagram sample with dot (graphviz)
digraph G {
node [shape = "record"]
edge [arrowhead = "empty"]
Animal [label = "{Animal|+ name : string\l+ age : int\l|+ die() : void\l}"]
}
@charlycoste
charlycoste / Makefile
Created December 14, 2012 12:30
Makefile for eZ Publish
cache:
php bin/php/ezcache.php --clear-all --purge
autoloads:
php bin/php/ezpgenerateautoloads.php
@charlycoste
charlycoste / my_query.php
Last active December 10, 2015 00:19 — forked from dpobel/new_way.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 January 6, 2013 08:58
Makes User objects as containers and move all articles bookmarks to users subnodes.
<?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 December 10, 2015 17:18
Responsive menu system with media queries
<!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>
@charlycoste
charlycoste / form.html
Last active December 10, 2015 17:18
Login form
<!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>
$("dt").toggle( function(){$(this).nextAll().show()},
function(){$(this).nextAll().hide()})
.nextAll().hide();
<?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
// 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;
});
(function( $ ) {
$.fn.show_hide = function(bloc1, bloc2, text1, text2, text3, u1, u2, u3, nodeId) {
return this.each(function(){
var bouton = $(this);
var parent = $(bloc1);
var bloc = parent.find(bloc2);