Skip to content

Instantly share code, notes, and snippets.

View fuhrmanator's full-sized avatar

Christopher (Cris) Fuhrman fuhrmanator

View GitHub Profile
@fuhrmanator
fuhrmanator / plantuml_snippets.code-snippets
Last active June 15, 2021 17:53
PlantUML snippets in VSCode
{
// In VSCode, go to: File > Preferences > User Snippets
//
// Place your global snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and
// description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope
// is left empty or omitted, the snippet gets applied to all languages. The prefix is what is
// used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders.
// Placeholders with the same ids are connected.
// Example:
// Quick-and-dirty PEG.js grammar from EBNF published in https://arxiv.org/abs/2011.10975
// Try it with https://pegjs.org/online
// see github:profcfuhrmanets/mse-tools for latest
Root = d:Document ? {return {nodes:d}}
Document = OPEN nodes:(ElementNode *) CLOSE {return nodes}
ElementNode = OPEN name:ELEMENTNAME id:Serial ? attrNodes:(AttributeNode *) CLOSE
{return {name:name, id:id, attrs:attrNodes}}
Serial = OPEN ID id:INTEGER CLOSE {return id}
AttributeNode = OPEN n:SIMPLENAME vals:(ValueNode *) CLOSE {return {name:n, vals:vals } }
ValueNode = Primitive / Reference / ElementNode
@fuhrmanator
fuhrmanator / contributions.sh
Last active September 18, 2021 21:09
Contributions script (driver) for gitinspector (LOG210, different reports for test, design, etc.)
#!/bin/bash
globalOptions="--localize-output --grading --format=html"
authorsToExcludeArray=("Christopher Fuhrman" "Yvan Ross")
reportPrefix="ContributionsÉquipe"
reportTests="${reportPrefix}Test.html"
reportModels="${reportPrefix}Modèles.html"
reportTypeScript="${reportPrefix}TypeScript.html"
reportViews="${reportPrefix}Views.html"
reportDocumentation="${reportPrefix}Docs.html"
nArgs=$#
@fuhrmanator
fuhrmanator / tg2p.st
Last active January 28, 2019 09:12 — forked from oliveiraallex/tg2p.st
Not so Terse Guide to Pharo
"**************************************************************************
* Allowable characters: *
* - a-z *
* - A-Z *
* - 0-9 *
* - .+/\*~<>@%|&? *
* - blank, tab, cr, ff, lf *
* *
* Variables: *
* - variables must be declared before use *
@fuhrmanator
fuhrmanator / tg2p.st
Created March 27, 2018 21:08 — forked from jdevoo/tg2p.st
Not so Terse Guide to Pharo
"**************************************************************************
* Allowable characters: *
* - a-z *
* - A-Z *
* - 0-9 *
* - .+/\*~<>@%|&? *
* - blank, tab, cr, ff, lf *
* *
* Variables: *
* - variables must be declared before use *
@fuhrmanator
fuhrmanator / Playground.st
Last active March 23, 2018 15:14
Pharo sample to show UML
| b classes targetClassNames |
classes := MooseModel root allModels first allClasses select: [:each |
(each container mooseName beginsWith:'edu::' ) and: (each name endsWith: 'Optimizer') ].
"La doc sur les collections m'est toujours super utile: http://pharo.gforge.inria.fr/PBE1/PBE1ch10.html"
targetClassNames := Set withAll: #('CBMOptimizer','CBMSOptimizer','CBMUtilityOptimizer').
view := RTView new.
view @ RTZoomableView.
@fuhrmanator
fuhrmanator / Moodle_date_time_text_box.user.js
Last active December 24, 2017 21:00
UserScript to make changing dates in Moodle more ergonomic (less clicks and copy-paste)
// ==UserScript==
// @name Moodle date-time text box
// @namespace https://profs.etsmtl.ca/cfuhrman/
// @version 0.1
// @description Save many clicks by providing a text box to specify dates and times in Moodle dates, on the https://moodle.org/plugins/report_editdates -- uses JQuery datetimepicker to validate (or pick) times
// @author Christopher Fuhrman
// @updateURL https://gist.github.com/fuhrmanator/7e9bf5e03302c91593348061c1e81459/raw/89a686fea5456c1e7898be6ad4a2a823a4a98c9e/Moodle_date_time_text_box.user.js
// @downloadURL https://gist.github.com/fuhrmanator/7e9bf5e03302c91593348061c1e81459/raw/89a686fea5456c1e7898be6ad4a2a823a4a98c9e/Moodle_date_time_text_box.user.js
// @match https://*/report/editdates/index.php*
// @require https://code.jquery.com/jquery-latest.js
@fuhrmanator
fuhrmanator / .block
Last active April 8, 2024 22:31
Horloge pour l'ÉTS style Railway Station Clock de Hilfiker en JavaScript
license: gpl-3.0
@startuml
skinparam style strictuml
hide methods
hide empty members
class Instructor
class Term {
name : String
year : Year
coursesStart : Date
coursesEnd : Date