/**
* Localize current URL having a {parameter}.
*
* Awaiting a fix to the laravel-localization package
* this helper will translate any translated route
* that accept a mandatory slug, but no ?query.
*
* GitHub issue: https://github.com/mcamara/laravel-localization/issues?utf8=%E2%9C%93&q=is%3Aissue%20is%3Aopen%20getLocalizedURL
*
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const SW_VERSION = '1.2.3' // update it when the app changes: invalidates `resourcesToCache` | |
const resourcesCacheKey = `cache-v${SW_VERSION}` | |
const microfrontendCacheKey = `mfe` // not sure versioning is needed | |
const resourcesToCache = [ | |
'/', | |
'site.webmanifest', | |
'css/app.css', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const MILLISECONDS_PER_MINUTES = 1000 * 60; | |
const state = { | |
now: (new Date()), | |
intervalTimer: null, | |
}; | |
const mutations = { | |
now(state) { | |
state.now = new Date(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Providers; | |
use Illuminate\Support\Facades\Blade; | |
use Illuminate\Support\ServiceProvider; | |
class ViewServiceProvider extends ServiceProvider | |
{ | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const trackingCode = '324567890' | |
const postCode = 1000 | |
const language = 'EN' // 'FR', 'NL', 'EN' | |
let status = null | |
let deliveryWindow = null | |
setInterval(() => { | |
fetch('https://track.bpost.cloud/track/items?itemIdentifier=' + trackingCode + '&postalCode=' + postCode) | |
.then(res => { |
They are all privacy-focused. Some can be self-hosted, others don’t.
- Umami: open source, self-hosted or (soon) managed hosting
- Plausible Analytics: hosted in EU
- Fathom Analytics: hosted in US, but anonymized in EU and can also be fully hosted in EU (instead of US)
- Simple Analytics: hosted in EU
- Splitbee: hosted in EU
- Matomo: open source, self-hosted or managed hosting in EU
- Chiffre.io: hosted in Europe
- Cabin
- Open your dev tools.
- Paste this in the console:
Array
.from(document.querySelectorAll('.js-file'))
.filter(el => !('fileUserViewed' in el.dataset) && el.dataset.fileDeleted == 'false')
.map(el => el.querySelector('.file-header').dataset.path)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Answer to https://twitter.com/stevepiron/status/900732215415508994 | |
* | |
* How can I not show the :focus style when clicking an element, but keep it for keyboard navigation? | |
*/ | |
// hover (mouse only) | |
:hover {} | |
// click (mouse only) | |
:active:hover {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<style> | |
:root { | |
/* Like me, you probably add a space between the semicolon and the value. | |
👇 */ | |
--bg: hsl(0 0% 100%); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- « un neu concepteurice », says Voice Over --> | |
<p>Test 1 : nous recherchons un•e concepteur•rice & rédacteur•rice francophone.</p> | |
<!-- « une concepteurice », says Voice Over `(content: '•'` is ignored) --> | |
<p>Test 2 : nous recherchons un<span class="content-middot"></span>e concepteur<span class="content-middot"></span>rice & rédacteur<span class="content-middot"></span>rice francophone.</p> | |
<!-- `alt is ignored by macOS Voice Over --> | |
<p>Test 3 : nous recherchons <span alt="un concepteur et rédacteur, ou une conceptrice et rédactrice">un•e concepteur•rice & rédacteur•rice</span> francophone.</p> | |
<!-- `aria-label` or `aria-labelledby` is ignored by macOS Voice Over --> |
NewerOlder