Skip to content

Instantly share code, notes, and snippets.

View jmbruel's full-sized avatar

Jean-Michel Bruel jmbruel

View GitHub Profile
Verifying that +jmbruel is my openname (Bitcoin username). https://onename.io/jmbruel

DocGist Example

DocGist is a tool that renders AsciiDoc documents fetched from GitHub gists or other sources. The rendering is performed in the browser using the asciidoctor.js library. The original use case for this was http://gist.neo4j.org/ which has additional features to create examples for the Neo4j graph database.

How To Use

  • Create/locate a gist on GitHub (or use a file in Dropbox).

    • Write text using AsciiDoc syntax in it.

:definitions:
:slidesurl: http://jmbhome.github.io/talks
//Layouts
:standHeight: 250
:standScreen: 500
:standWidth: 250
// raccourcis sites
:aadl: http://www.aadl.info/[AADL]indexterm:[AADL]
@jmbruel
jmbruel / Alfred.txt
Created November 8, 2018 12:09
Alfred Case Study specs (FR)
L’idée est de créer un système qui viendra rendre les services suivants :
- Affichage d’un indicateur de santé de la maison
- Affichage des indicateurs détaillés sur différents domaines (en instantané et avec des graphiques) / en le ramenant à des indicateurs intelligibles pour l’humain
- Affichage des prévisions pour la journée / pour la semaine
- Affichage de conseils / Alertes pour bénéficier au mieux des capacités passives de la maison
L'indicateur de santé doit être capable de combiner les informations provenant de la mesure de plusieurs grandeurs physiques :
- Température
- Humidité
- CO2
@jmbruel
jmbruel / Game.java
Created December 17, 2018 10:17
CPOA Design pattern course IUT Blagnac
package cpoa2018;
// Initial code from https://www.usna.edu/Users/cs/wcbrown/courses/S15IC211/lec/l03/lec.html
import java.util.*;
public class Game
{
public static boolean winner(int c1, int c2)
{
int f1 = Card.cardToFace(c1), s1 = Card.cardToSuit(c1);
int f2 = Card.cardToFace(c2), s2 = Card.cardToSuit(c2);
@jmbruel
jmbruel / Player.java
Created December 17, 2018 10:24
CPOA Design pattern course IUT Blagnac
package cpoa2018;
// Initial code from https://www.usna.edu/Users/cs/wcbrown/courses/S15IC211/lec/l03/lec.html
public class Player
{
int card;
double money;
}
@jmbruel
jmbruel / Card.java
Created December 17, 2018 10:24
CPOA Design pattern course IUT Blagnac
package cpoa2018;
// Initial code from https://www.usna.edu/Users/cs/wcbrown/courses/S15IC211/lec/l03/lec.html
import java.util.*;
public class Card
{
public static int makeCard(int face, int suit) { return 20*suit + face; }
public static int cardToSuit(int card) { return card/20; }
@jmbruel
jmbruel / checkModel.rb
Last active November 10, 2020 16:10
Test for the Strategy pattern
# -*- coding: utf-8 -*-
# usage: ruby checkModel.rb [file]
# -------------------
# Author:: Jean-Michel Bruel (mailto:[email protected]) improved by JMI
# Copyright:: Copyright (c) 2014--2020 JMB
# License:: Distributes under the same terms as Ruby
# -------------------
require "minitest/autorun"
MODEL_NAME = ARGV[0] ? ARGV[0] : "TP1.plantuml"
@jmbruel
jmbruel / testfix0.rb
Created November 10, 2020 16:26
Checking Fix0
# -*- coding: utf-8 -*-
# usage: ruby checkfix#.rb [file]
# -------------------
# Author:: Jean-Michel Bruel (mailto:[email protected])
# Copyright:: Copyright (c) 2020 JMB
# License:: Distributes under the same terms as Ruby
# -------------------
README = ARGV[0] ? ARGV[0] : "../README.adoc"
@jmbruel
jmbruel / ipod-tp1-pom.xml
Last active November 15, 2020 07:13
Minimalist pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>TP1</groupId>
<artifactId>TP1</artifactId>
<version>1.0.0-SNAPSHOT</version>