Skip to content

Instantly share code, notes, and snippets.

Trying to find other CGI colleagues who writes JavaScript

Renoir Boulanger renoirb

Trying to find other CGI colleagues who writes JavaScript
Block or report user

Report or block renoirb

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
renoirb / post-rush-install.js
Last active Aug 29, 2019
rush post-rush-install script example
View post-rush-install.js
"use strict";
* In order to run on Linux/Unix and Windows, we can't use `#!/usr/bin/env node` at the top.
* After `rush update`, copy files to the monorepo root.
const path = require("path");
renoirb / resume.json
Last active Nov 1, 2019
View resume.json
{"meta":{"theme":"elegant","lastModified":"2019-10-30T17:39:60","canonical":"","alternate":"https//","source":""},"basics":{"name":"Renoir Boulanger","label":"Full-Stack Developer & Senior Web Development Professional","image":"","picture":"","email":"","url":"","website":"","summary":"Experienced full-stack developer, I have a broad and deep understanding of the Open Web stack, Front-end and Server Techniques to build, deploy and maintain Web sites that scale.","location":{"city":"Montréal","region":"Quebec","countryCode":"CA","postalCode":"H4P 2G9"},"profiles":[{"network":"LinkedIn","username":"renoirb","url":""},{"netw
renoirb / utility-functions-bag.js
Created Aug 4, 2019
JavaScript utility functions bag
View utility-functions-bag.js
function daysAgo (n = 1) {
const d = parseInt(n) || 0
const dateObj = new Date()
if (isNaN(d)) {
return dateObj
return new Date(dateObj.setDate(dateObj.getDate() - d))
View render-helpers.js
* Copy-Pasta from Vue.js transpiled source (!).
* NOT TO USE, just to point out cool parts.
import {
renoirb / hooks-index.js
Last active Nov 15, 2018
Nuxt 'render:setupMiddleware' hook example
View hooks-index.js
// file: hooks/index.js
import render from './render'
// 'render:context'
export default (nuxtConfig) => ({
render: render(nuxtConfig),
renoirb / Makefile
Last active Jan 24, 2019
Vue Component Library Build
View Makefile
src=$(shell ls src/*.vue)
out=$(subst src,dist,$(subst .vue,,$(src)))
ifndef OUTPUT
OUTPUT = lib
all: dist/index.js $(out)
renoirb / nuxt-apollo-graphql-stash.patch
Last active Oct 30, 2018
Attempt at making local module for Apollo GraphQL for Vue on Nuxt
View nuxt-apollo-graphql-stash.patch
From f1cf052838fa56c305f57e02f039bea5d957d81f Mon Sep 17 00:00:00 2001
From: Renoir Boulanger <>
Date: Mon, 29 Oct 2018 23:58:40 -0400
Subject: [PATCH] Attempt adding own Vue Apollo
modules/graphql.js | 73 ++++++++++++++++++++++++++++++++++
nuxt.config.js | 1 +
package.json | 14 +++++--
plugins/graphql-client.js | 41 +++++++++++++++++++
View components.js
* Vue.js v2.5.17
* (c) 2014-2018 Evan You
* Released under the MIT License.
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.Vue=t()}(this,function(){"use strict";var y=Object.freeze({});function M(e){return null==e}function D(e){return null!=e}function S(e){return!0===e}function T(e){return"string"==typeof e||"number"==typeof e||"symbol"==typeof e||"boolean"==typeof e}function P(e){return null!==e&&"object"==typeof e}var r=Object.prototype.toString;function l(e){return"[object Object]"}function i(e){var t=parseFloat(String(e));return 0<=t&&Math.floor(t)===t&&isFinite(e)}function t(e){return null==e?"":"object"==typeof e?JSON.stringify(e,null,2):String(e)}function F(e){var t=parseFloat(e);return isNaN(t)?e:t}function s(e,t){for(var n=Object.create(null),r=e.split(","),i=0;i<r.length;i++)n[r[i]]=!0;return t?function(e){return n[e.toLowerCase()]}:function(e){return n[e]}}var c=s("slot,component",!0),u=
renoirb / foo.js
Created Aug 27, 2018
Vue component in a Gist
View foo.js
// const render = Vue.compile('<h1>Hello {{what}}</h1>')
const HelloComponent = Vue.component('greet-component', {template: '<h1>Hello {{what}}</h1>', props: ['what']})
const app = new Vue({template: '<div><greet-component :what="name" /></div>', components: { HelloComponent }, data: {name: 'World'}})
app.$children[0].$el.textContent // "Hello World"
renoirb / time.js
Last active Aug 9, 2018
JavaScript Time Range Functions when using UNIX Epoch
View time.js
class DateEpoch {
constructor (epoch = {}) {
const typeCheckFinite = e => isFinite(e)
const typeCheckDate = e => 'getUTCDate' in e
switch (true) {
case typeCheckFinite(epoch):
this.epoch = toMilliseconds(parseInt(epoch))
case typeCheckDate(epoch):
this.epoch = epoch.getTime()
You can’t perform that action at this time.