Skip to content

Instantly share code, notes, and snippets.

View jokesterfr's full-sized avatar
🃏
Focusing

Clément Désiles jokesterfr

🃏
Focusing
View GitHub Profile
@jokesterfr
jokesterfr / redirector.json
Last active January 6, 2024 17:42
A configuration for the Redirector Firefox Extension https://einaregilsson.com/redirector (credits to Ploum for the idea)
{
"createdBy": "Redirector v3.5.3",
"createdAt": "2023-12-16T22:17:12.106Z",
"redirects": [
{
"description": "Youtube",
"exampleUrl": "https://youtube.com/truc",
"exampleResult": "https://piped.kavin.rocks/truc",
"error": null,
"includePattern": "https://*youtube.com/*",

Compile and install Node.js and pnpm (yarn and npm are included), Node.js requires Python 3 but no more than Python 3.12... https://github.com/nodejs/node/blob/main/configure#L7 To circumvent this, you can directly call python3 ./configure.py instead of ./configure:

NODE_VERSION=16.16.0
curl --silent --fail --location --output /tmp/node.tar.gz "https://nodejs.org/dist/v${NODE_VERSION}/node-v$NODE_VERSION.tar.gz" \
  && tar xzf /tmp/node.tar.gz \
  && cd "node-v$NODE_VERSION" \
 && apk add --no-cache --virtual .build-deps \
#!/usr/bin/env node
const {
EventStoreDBClient,
END,
BACKWARDS,
FORWARDS,
} = require("@eventstore/db-client");
require("dotenv").config();
const eventStoreClient = EventStoreDBClient.connectionString(
#!/usr/bin/env node
const { EventStoreDBClient, BACKWARDS, END } = require("@eventstore/db-client");
require("dotenv").config();
const eventStoreClient = EventStoreDBClient.connectionString(
process.env.EVENTSTORE_CONNECTION_STRING
);
const isBusinessStream = (event) =>
event.event.streamId.split("$").length === 1;
@jokesterfr
jokesterfr / docker-compose.yml
Created July 27, 2020 08:34
A prestashop 1.7 simple docker-compose
version: '3.7'
services:
prestashop:
image: prestashop/prestashop:1.7
container_name: prestashop
depends_on:
- mysql
networks:
- prestashop_net
# Redirects www
server {
server_name www.domain.tld;
return 301 $scheme://domain.tld$request_uri;
}
# Serve HTTP
server {
listen 80;
server_name domain.tld;
@jokesterfr
jokesterfr / i18n_messageformat_handlebars
Last active August 29, 2015 14:05
Example of i18n implementation with message format and handlebars
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<!--
title: Demo using both handlebars and messageformat
date: 2014-08-12
-->
<script src="http://builds.handlebarsjs.com.s3.amazonaws.com/handlebars-v1.3.0.js"></script>