Skip to content

Instantly share code, notes, and snippets.

View adrienpoly's full-sized avatar
💭
I may be slow to respond.

Adrien Poly adrienpoly

💭
I may be slow to respond.
View GitHub Profile
@adrienpoly
adrienpoly / test.csv
Last active August 22, 2022 15:15 — forked from RonanLOUARN/test.csv
View test.csv
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
HISTOIRE;UNIVERS;Typo Body Size (px);Typo Body interlignage (px);C;M;J;N;COULEUR;ILLUSTRATRICE;AUTEUR;ASSETS - ILLUSTRATIONS;ASSETS - COUV-2&3 (TOUJOURS PAREIL);ASSETS - COUV 4 (RANDOM 5 IMG) - même univers;DÉFINITIONS
Le Merveilleux;Écriture Libre;16;24;0;34;50;0;#FFBB87;Irène Bonacina;-;https://drive.google.com/drive/u/1/folders/1VBcX6Uzub6hmPxL-qTJICs-ZSbpEid5c;https://drive.google.com/drive/u/1/folders/1uwiGzQ_5AWREAPiZShx9jXi6Vp_XrY3X;https://drive.google.com/drive/u/1/folders/1hDEYxZiqNeuDzaol1_OEREYXWX9keeLr;NON
La Science Fiction;Écriture Libre;16;24;50;57;12;0;#9378A7;Taty Vovchek;-;https://drive.google.com/drive/u/1/folders/1RDSlVztEvTsO44Vt2uz_8vne0S6U6fdd;https://drive.google.com/drive/u/1/folders/1uwiGzQ_5AWREAPiZShx9jXi6Vp_XrY3X;https://drive.google.com/drive/u/1/folders/1hDEYxZiqNeuDzaol1_OEREYXWX9keeLr;NON
La Bergère et le Ramoneur;Forêt Enchantée;19;29;0;32;84;0;#FFAD29;Irène Bonacina;Hans Christian Andersen;https://drive.google.com/drive/folders/1Hzw7zF5qSyw3H1qU_SBFLy_NH9KSeqmE?usp=sharing;
@adrienpoly
adrienpoly / pdfx.rb
Created January 25, 2022 05:43 — forked from fidothe/pdfx.rb
Worked example for creating a PDF/X-1a:2003 document with Prawn
View pdfx.rb
require 'prawn'
require 'prawn/measurements'
# I have a small collection of links to the resources I used to figure all
# this out: http://pinboard.in/u:fidothe/t:pdfx
module PDFX
class PageBox
include Prawn::Measurements
attr_reader :bleed_mm
@adrienpoly
adrienpoly / upgrade.md
Created September 24, 2021 09:32
Upgrade to Stimulus 3 recommandations
View upgrade.md

To upgrade to Stimulus 3.0 and minimize the side effects of the npm package name change here is my suggestion

# add the proxy package
yarn add stimulus

# add the new @hotwired/stimulus package
yarn add @hotwired/stimulus

# add the dedicated package for the Webpack helpers
@adrienpoly
adrienpoly / application.html.erb
Last active August 30, 2023 19:49
Capybara / Stimulus test helper to ensure JS is ready when test starts
View application.html.erb
<!DOCTYPE html>
<html>
<head>
...
</head>
<body data-controller="js">
<%= yield %>
</body>
</html>
@adrienpoly
adrienpoly / static.js
Last active October 20, 2020 16:40
accessing static values from a class instance
View static.js
class A extends Controller {
static targets = ["a", "b"]
connect() {
A.targets // -> ["a", "b"]
}
}
export default class extends Controller {
static targets = ["a", "b"]
@adrienpoly
adrienpoly / index.html
Created May 8, 2019 09:05
Fetch & the gang
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Playground - JavaScript 101</title>
<style media="screen">
.red { color: red; }
</style>
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
@adrienpoly
adrienpoly / actiontext.md
Created October 4, 2018 13:08
Step by Step guide to test Rails ActiveText
View actiontext.md