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
{use $compte, $tableau}
<table>
<thead>
<tr><th>Débit</th><th colspan="4">{$compte}</th><th>Crédit</th></tr>
</thead>
<tbody>
<tr>
<th>Dates</th><th>Libellés</th><th>Sommes</th>
<th>Dates</th><th>Libellés</th><th>Sommes</th>
</tr>
@charlycoste
charlycoste / exemple.csv
Last active August 29, 2015 13:55
Génère une liste aléatoire de sha1, avec leurs alias, sans collision. Ce script peut être rejoué avec une limite supérieure (la variable $max) pour générer de nouveaux sha1 sans écraser les anciens. J'ai écrit ce script pour numéroter mes documents comptables de façon unique tout en pouvant y faire référence simplement par leur alias.
71 71A2FE8DBBBD2B7C60083CFFC4714FAE6860D668
F7 F70F565F1FD894CCD0FC9F9CD3BB327C83603A89
89 899DF47D3C425BFA64FF0CB46139BA639FC1E348
DF DFD7BEE64B0882557415C95B803F0EBFC5D4E31C
22 22EE2B60CB7FEF3D6FFF9F2E7E81574DBCB52CC7
B2 B2270E7BFBCD9FCEF5DFDB5FABAB6694E1FF9BE8
D9 D99D4328DAA150B2D0C0846B0217BF0BADDBBAB2
39 39BA9D49DBFF3C56A3E3FEFC9B89BF8F4A07D084
0C 0C1812FC972EE469A6822DAEB8E43626ADBD5297
08 086C7549AC945C681A4848C6CD679998D8B76B78
namespace :db do
desc 'Loads one of the backup made with the db:export:remote task'
task :import_to_local do
end
desc 'Creates a backup from a remote database server'
task :backup, :roles => :db do
end
@charlycoste
charlycoste / ezcPersistentXmlManager.php
Created March 10, 2014 17:30
Persistent Manager avec prise en charge de XML
<?php
class ezcPersistentXmlManager extends ezcPersistentDefinitionManager
{
private $file;
public function __construct( $file )
{
if( file_exists($file) )
$this->file = $file;
}
document.onmousemove = function(e){
var rect = document.getElementById('r');
rect.setAttribute('x',e.clientX-(rect.getAttribute('width')/2));
rect.setAttribute('y',e.clientY-(rect.getAttribute('height')/2));
};
document.onclick = function(e){
var point = document.createElementNS("http://www.w3.org/2000/svg",'rect');
var rect = document.getElementById('r');
<w:p>
<w:pPr>
<w:pStyle w:val="Corpsdetexte"/>
<w:numPr>
<w:ilvl w:val="0"/>
<w:numId w:val="15"/>
</w:numPr>
<w:tabs>
<w:tab w:val="left" w:pos="0" w:leader="none"/>
</w:tabs>
@charlycoste
charlycoste / download_github_bills.coffee
Last active August 29, 2015 14:13
Automatically download github bills with CasperJS
login = "<login>"
password = "<password>"
directory = "<directory>"
organization = "<organization>"
casper = require('casper').create
verbose: true
logLevel: "debug"
getLinks = ->
@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 )
)
);