Skip to content

Instantly share code, notes, and snippets.

View pelevesque's full-sized avatar
💭
looking for work

Pierre-Emmanuel Lévesque pelevesque

💭
looking for work
View GitHub Profile
void KeepinItTightMan (int value, int outdent) {
int indent = outdent - (NumLength (value) - 1);
for (auto x : Range (1, indent, 1)) {
std::cout << " ";
}
std::cout << y;
for (auto x : Range (1, outdent, 1)) {
std::cout << " ";
}
std::cout << "|";
for (auto x : Range (1, indent, 1)) {
std::cout << " ";
}
std::cout << value;
for (auto x : Range (1, outdent, 1)) {
std::cout << " ";
}
std::cout << "|";
@pelevesque
pelevesque / SVGWriterTest.js
Created January 9, 2021 04:30 — forked from carlynorama/SVGWriterTest.js
Write SVG to file in Javascript
let centerX = 15
let centerY = 15
let radius = 10
let style = "fill:rgb(200,200,255);"
const fs = require('fs')
let svg = ""
svg += '<?xml version="1.0" encoding="UTF-8" standalone="no"?>\n'
svg += '<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'
@pelevesque
pelevesque / summertime.orfeo
Last active August 9, 2020 05:06
Summertime by George Gershwin (melodic excerpt)
(:=
(:0 "Summertime by George Gershwin (melodic excerpt)")
(:4 _ _ E5 C5)
(:4 E5-)
(:4 (-E _) (D5. ^C5) (D5. ^E5) C5)
(:4 A4 E4-)
(:4 -E _ E5 C5)
(:4 ^D5 D5-. (:2 -D))
)
function setSumOfDatumDurationsPerMusicExpression(tokens) {
let areSummingDatumDurations = false
let sumOfDatumDurations
let indexOfOpenMusicExpr
let numExprFlags
let numExprDots
for (let i = deepestDepth; i >= 0; i--) {
tokens.forEach((token, j) => {
if(token.depth === i+1 && areSummingDatumDurations && token.type === 'OPEN_MUSIC_EXPR'){
sumOfDatumDurations += token.duration
<Orfeo_0.1.0> ::= <keyword_score> <ws>+ <music_expr>
<music_expr> ::= <left_curly_bracket> <ws>* (<voice_expr> (<ws>* <comma> <ws>* <voice_expr>)* (<ws>* <comma>)?)? <ws>* <right_curly_bracket>
<voice_expr_content> ::= <datum> | <voice_expr>
<voice_expr> ::= <left_parenthesis> <ws>* (<duration>? | ((<duration> <ws>+)? <voice_expr_content> (<ws+ <voice_expr_content>)*)) <ws>* <right_parenthesis>
<duration_sigil> ::= ':'
<duration_equal> ::= <duration_sigil> "="
<duration_nonnegative_int> ::= <duration_sigil> <nonnegative_int>
<duration_nonnegative_real> ::= <duration_sigil> <nonnegative_real>
<duration_time_signature> ::= <duration_sigil> <time_signature>
<duration> ::= <duration_time_signature> | <duration_nonnegative_real> | <duration_nonnegative_int> | <duration_equal>
@pelevesque
pelevesque / website_verification_tools.txt
Created October 29, 2019 04:02
website verification tools
https://www.seocentro.com/tools/seo/seo-analyzer.html
https://search.google.com/test/mobile-friendly
https://www.woorank.com
https://developers.google.com/speed/pagespeed/insights/
https://gtmetrix.com/
https://www.webpagetest.org/
https://search.google.com/test/mobile-friendly
https://www.screamingfrog.co.uk/seo-spider/
https://www.link-assistant.com
http://siteliner.com/
@pelevesque
pelevesque / i-love-you-world.js
Created May 21, 2019 02:29
I love you world! (An alternative to the traditional hello-world.js)
console.log('I love you world!')
@pelevesque
pelevesque / unix-philosphy.md
Created May 8, 2019 01:48
Resume of The Unix Philosophy | 1995 | Mike Gancarz

The Unix Philosophy | 1995 | Mike Gancarz

hard tenets

  • small is beautiful
  • make each program do one thing well
  • build a prototype as soon as possible
  • choose portability over efficiency
  • store numerical data in ASCii files
  • use software leverage to your advantage
@pelevesque
pelevesque / node-module-publishing.md
Last active April 6, 2024 16:34
How to create and publish a node.js module.