Skip to content

Instantly share code, notes, and snippets.

Avatar

Renoir Boulanger renoirb

View GitHub Profile
@renoirb
renoirb / extract_from_message_headers.mjs
Last active March 7, 2023 05:39
Extract data from Proton Mail
View extract_from_message_headers.mjs
/**
* From a message, click on "more" and "message headers"
*
* Run this command.
*/
var extractEmailHeaders = (selector = 'pre') => {
const elRef = document.querySelector(selector)
const headers = new Map()
const eachLineHeaderNameParts = []
var extractHeaderName = (input) => {
@renoirb
renoirb / README.md
Last active February 5, 2023 04:58
Load content from a Gist only using a Gist ID and a loader.
View README.md
@renoirb
renoirb / 0README.md
Created January 13, 2023 14:39
Date Range component logic
View 0README.md

Component to select a date range

This was logic written in a pregnancy scheduling mini web app that I wanted to separate the date range out.

View 0_README.md

RBC Royal Bank Online Banking doesn't allow extracting CSV of transactions

This does. Just run this when you’ve selected the filter criteria you want, then paste this in developer tool. It'll transform the transaction button with "Download CSV". A date range and you want those transactions as CSV, with transaction number and only amounts, no formatting: so you can use your spreadsheet to manage that data.

Furthermore, RBC’s OMNI Team; What would be even cooler is if when we filter the transactions with criterias. When we click to view an item, like a Cheque image, when we click "Back" on the browser, we don’t lose the search we had. Like it currently does. That would be easily possible if the URL kept the filter criterias. This changes browser history, and allows to use the Back button *for free*. But the FrontEnd code doesn’t do that. And that Gist’s content isn't covering this problem — But I might tackle that one too some day.

Illustration

@renoirb
renoirb / 0_README.md
Last active October 23, 2022 00:34
Extracting transactions from RBC Personal Online Banking OMNI
View 0_README.md

RBC Royal Bank Online Banking doesn't allow extracting CSV of transactions

This does. Just run this when you’ve selected a date range and you want those transactions as CSV

@renoirb
renoirb / 0_MAKEFILE_WORTHWILE_BOOKMARKS.md
Last active November 27, 2022 16:13
List of publicly available Bash & Makefile black magic I can't get to remember by heart
@renoirb
renoirb / components.ts
Created November 5, 2021 01:41
Lit.Dev with @lit-labs/context
View components.ts
import { LitElement, html, TemplateResult } from 'lit'
import { property } from 'lit/decorators/property.js'
import { state } from 'lit/decorators/state.js'
import { assert } from '@esm-bundle/chai'
import { ContextProvider, createContext } from '../context.js'
import { ContextConsumer } from '../lib/controllers/context-consumer.js'
@renoirb
renoirb / svg-loader.ts
Created September 27, 2021 22:02
Vite Lit.dev SVG loader
View svg-loader.ts
import { html } from 'lit'
import { unsafeSVG } from 'lit/directives/unsafe-svg.js'
import { dirname } from 'path'
import { readFile } from 'fs/promises'
import { Plugin } from 'vite'
import { URL } from 'url' // in Browser, the URL in native accessible on window
export const svgLoader = (): Plugin => {
const svgRegex = /\.svg(\?(raw|url|component))?$/
@renoirb
renoirb / 0README.md
Created August 16, 2021 22:40
Jenkinsfile when using RushJS.io and releasing only on CI
View 0README.md

Example of a Jenkinsfile when publish on Nexus and use with RushJS.io

@renoirb
renoirb / 0README.md
Last active February 20, 2023 15:34
Example of a Page rendered within an application layout customElement and rendered client-side from raw markdown hosted on a GitHub Gist
View 0README.md

locale: en-CA title: Example of a Page rendered within an application layout customElement and rendered client-side from raw markdown hosted on a GitHub Gist canonical: https://renoirb.github.io/blogtini/using-app-layout.html date: &createdAt '2023-02-19T13:44:11-04:00' createdAt: *createdAt categories:

  • Projects tags:
  • web-components