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

Keybase proof

I hereby claim:

  • I am charlycoste on github.
  • I am charlycoste (https://keybase.io/charlycoste) on keybase.
  • I have a public key whose fingerprint is 27DA 7A29 3773 56CC 9114 7D3E 25BA B73A 257D 4ECE

To claim this, I am signing this object:

{{! DO NOT EDIT THIS FILE! Use an override template instead. }}
<form method="post" action={{ action }}>
<div class="maincontentheader">
<h1>{{ title }}</h1>
</div>
{{# warnings }}
<div class="warning">
<h2>{{ title }}</h2>
@charlycoste
charlycoste / Makefile
Last active September 3, 2020 18:04
Sample shell.nix for Sylius project (PHP)
.PHONY: build install test
build:
composer install --no-scripts
bin/console assets:install
bin/console sylius:install:assets
bin/console sylius:theme:assets:install
yarn install
yarn run build
yarn encore dev
@charlycoste
charlycoste / movable.coffee
Last active August 30, 2020 15:41
Movable HTML bloc with BackboneJS
class Movable extends Backbone.View
events:
'mousedown': 'grab'
'mouseup': 'release'
'mouseleave': 'release'
'mousemove': 'move'
'mouseover': -> @$el.css 'cursor', 'grab'
move: (e)->
return unless @moving
@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 / index.html
Created February 28, 2018 17:50
Quick and dirty link checker
<html>
<head>
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha256-3edrmyuQ0w65f8gfBsqowzjJe2iM6n0nKciPUp8y+7E=" crossorigin="anonymous"></script>
<script>
$(function(){
$('body').html($('#tpl-form').html());
});
$(document).on('submit', function(e){
<?php
class Perceptron
{
private $weights;
public function __construct($n)
{
for ($i=0; $i<$n; $i++) {
$this->weights[$i] = rand()/getrandmax()-0.5;
}
@charlycoste
charlycoste / ocr.php
Last active May 5, 2016 15:09
Analyse de relevés de compte LCL
<?php
$dir = './Relevés/';
$files = scandir($dir);
$regex = [
'/SOLDE INTERMEDIAIRE[^\d]+([\d ]+,\d{2})/'=>'intermediaire',
'/^\s+$/'=>'vide',
'/du \d{2}.\d{2}.\d{4} au \d{2}.\d{2}.\d{4}.*N°\s+\d+/'=>'numérotation',
'/RELEVE DE COMPTE COURANT/'=>'Titre',
Ancien solde
/^01(.{5})(.{4})(.{5})(.{3})(.{1})(.{1})(.{11})(.{2})(.{6})(.{50})(.{14})(.{16})$/
Mouvement
/^04(.{5})(.{4})(.{5})(.{3})(.{1})(.{1})(.{11})(.{2})(.{6})(.{2})(.{6})(.{31})(.{2})(.{7})(.{1})(.{1})(.{14})(.{16})$/
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.