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
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.
* https://gist.github.com/renoirb/b23b2d60fbe1ca25950005bb4056458d#gistcomment-3012183
*/
const path = require("path");
@renoirb
renoirb / resume.json
Last active Nov 1, 2019
{"theme":"elegant"}
View resume.json
{"meta":{"theme":"elegant","lastModified":"2019-10-30T17:39:60","canonical":"http://registry.jsonresume.org/renoirb","alternate":"https//renoirb.com/resume/detailed","source":"https://gist.github.com/renoirb/65fccabc7dea76fea70dccb14077ab0d#gistcomment-3010170"},"basics":{"name":"Renoir Boulanger","label":"Full-Stack Developer & Senior Web Development Professional","image":"https://secure.gravatar.com/avatar/cbf8c9036c204fe85e15155f9d70faec?size=420","picture":"https://secure.gravatar.com/avatar/cbf8c9036c204fe85e15155f9d70faec?size=420","email":"hello@renoirboulanger.com","url":"https://renoirb.com","website":"https://renoirb.com","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":"https://linkedin.com/in/renoirb"},{"netw
@renoirb
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.
*
* https://github.com/vuejs/vue/blob/2.6/dist/vue.runtime.esm.js
*/
import {
extend,
@renoirb
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
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
endif
all: dist/index.js $(out)
@renoirb
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 <hello@renoirboulanger.com>
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]"===r.call(e)}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
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.$mount()
app.$children[0].$el.textContent // "Hello World"
@renoirb
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))
break
case typeCheckDate(epoch):
this.epoch = epoch.getTime()
You can’t perform that action at this time.