Skip to content

Instantly share code, notes, and snippets.

View remyvhw's full-sized avatar

Remy Vanherweghem remyvhw

  • Ottawa, Canada
View GitHub Profile
@remyvhw
remyvhw / opbo-bdpb--qs-move-snippet.html
Last active May 9, 2022 13:45
OPBO-BDPB--QS_Guard
<nav class="hidden" id="qsmove">
<div style="display: flex; padding: 1rem; margin-bottom: 1rem; background-image: background-image: linear-gradient(to right, var(--tw-gradient-stops)); background-color: #F3F4F6; display: flex; flex-direction: column; border-radius: 0.25rem; border-color: #D1D5DB; gap: 1rem;">
<div id="qsmove-title" style="font-size:1.5rem">&mdash;</div>
<p id="qsmove-invite" style="margin:0;">&mdash;</p>
<div><a class="button" href="https://www.pbo-dpb.ca/" id="qsmove-cta" style="width: fit-content; display: flex; flex-direction: row; justify-content: center; align-items: center; gap: 0.5rem;"><span>https://www.pbo-dpb.ca/</span> <svg fill="none" stroke="currentColor" stroke-width="2" style="width: 1em;height: 1em;" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14" stroke-linecap="round" stroke-linejoin="round"></path> </svg></a></div>
</div>
</nav>
<script>
#!/usr/bin/env python
"""This script will respond to changes on S3 stored files by calling invalidating those files from their respective
Cloudfront distribution.
Currently suppports the following folders: `/artefacts/", `/images/` and `payloads--charges-utiles/`.
"""
__author__ = "Rémy Vanherweghem"
__email__ = "remy.vanherweghem@parl.gc.ca"
__version__ = "1.0.0"
__copyright__ = "Copyright 2021, The Parliamentary Budget Officer"
@remyvhw
remyvhw / semantic-ui-algolia.js
Last active June 22, 2018 08:23
Semantic UI & Algolia search
/*
Implementing Semantic UI and Algolia search can be a pain in the but if you're not use to deal with Semantic UI API stuff. This feels a little bit hackish but so far it works well enough; bonus for not needing the Algolia javascript client.
*/
var algolia = {
id: "Algolia app ID",
key: "Public key",
index: "Index name"
};