Skip to content

Instantly share code, notes, and snippets.

View cognominal's full-sized avatar

Stéphane Payrard cognominal

View GitHub Profile
<script>
import * as yootils from 'yootils';
import { createEventDispatcher } from 'svelte';
const dispatch = createEventDispatcher();
// export let name;
let type = 'vertical', h, w, size, pos;
let dragging = false
let refs = {}
@cognominal
cognominal / index.html
Last active February 16, 2020 17:55
sekret
<div id="f" class='root'>
<div id="g">
<div id="k">foo</div>
</div>
</div>
<div id='diag'>
kkkkk
</div>
@cognominal
cognominal / index.html
Last active February 18, 2020 14:34
Menu experiment
<h1>Widget witu
<div style="display: none">
<svg>
<!-- wrapper div allows use of innerHTML -->
<symbol id='menu' class='icon' viewBox='0 0 24 24'>
<line x1='3' y1='12' x2='21' y2='12' />
<line x1='3' y1='6' x2='21' y2='6' />
<line x1='3' y1='18' x2='21' y2='18' />
</symbol>
<symbol id='check' class='icon' viewBox='0 0 24 24'>
@cognominal
cognominal / a.html
Created February 12, 2020 17:56
menu
<script>
function menu_display(v) {
console.log('display ' + v)
let elt = document.querySelector('.menu')
elt.style.display = v;
console.log(elt.style.display)
}
function popup_menu() {
console.log('coucou')
@cognominal
cognominal / .tours---a-tour.tour
Last active March 23, 2021 13:25
Extending the raku languiage -- Breaking bad. Say my name
{
"$schema": "https://aka.ms/codetour-schema",
"title": "A tour",
"steps": [
{
"title": "Introduction",
"description": "Test.\nPrevious attempt lost"
}
]
}
grammar Text {
rule TOP { <line>+ }
{
my token ws { \h+ }
rule line { [\w+] + }
}
}
my $text = q:to<OZYMANDIAS>;
I met a traveller
=head1 slangs as knitted DSL, doubling on sigils.
The Perl language has the reputation to be line noise.
This reputation is partly due to sigils. It is not deserved.
A sigil is the character in front of an identifier.
Below, a Perl 5 oneliner that prints I<Hi Larry Wall>.
the identifier is C<$him> and the sigil is C<$>.
my $him='Larry Wall'; say "Hi $him"
@cognominal
cognominal / clone_repos
Last active September 23, 2016 16:09
clones a user github repos
=begin pod
C<clone_repos> clones a user github repos
Given a user/orga I<foo>, C<clone_repos I<foo>> creates
a I<foo> folder in current folder and clones the user/orga's repositories in
said folder
=end pod
use JSON::Fast;
@cognominal
cognominal / prez.pod
Last active March 25, 2021 22:38
presentation #prez
=begin pod
=head1 Cette présentation
Stéphane cognominal Payrard -- Journées Perl 2016 -- Samedi 25 Juin 2016
Ce talk
=item Objet et sa place dans les types Perl
=item Multiméthodes
=item Métamodèle OO
@cognominal
cognominal / prez.html
Created June 25, 2016 10:23
prez.html
<!doctype html>
<html>
<head>
<title></title>
<meta charset="UTF-8" />
<style>
/* code gets the browser-default font
* kbd gets a slightly less common monospace font
* samp gets the hard pixelly fonts
*/