Skip to content

Instantly share code, notes, and snippets.

View a-barbieri's full-sized avatar
💭
🐎 of course a horse

Alessandro a-barbieri

💭
🐎 of course a horse
View GitHub Profile
@a-barbieri
a-barbieri / cult.jpg.md
Last active November 28, 2018 15:19
WordPress Plugin to apply a filter and clone every image uploaded.
@a-barbieri
a-barbieri / MyComponent.js
Last active March 21, 2019 15:40
Saga sequence
import React, { Component } from "react";
import { getFirstAndSecondAction } from "actions/getFirstAndSecondAction";
class MyComponent extends Component {
static async getInitialProps({ store }) {
// Trigger the saga sequence
store.dispatch(getFirstAndSecondAction());
return {};
@a-barbieri
a-barbieri / loop-per-pyetro.php
Last active November 11, 2019 14:28
Per Pyetro
<?php if (have_posts()): ?>
<ul id="image-data-list">
<?php while(have_posts()): the_post(); ?>
<li data-image-url="<?= your_post_image_url ?>"></li>
<?php endwhile; ?>
</ul>
<?php endif; ?>
@a-barbieri
a-barbieri / README.md
Last active October 6, 2021 09:37
WP_GraphQL Relevanssi Plugin

WP_GraphQL Relevanssi Plugin

A plugin to enable Relevanssi research through WP_GraphQL.

Requirements

This plugin requires Relevanssi >= 4.6.0 and WP_GraphQL >= 0.8.0.

GraphQL query format

@a-barbieri
a-barbieri / server.js
Created July 13, 2020 15:10 — forked from edolyne/server.js
Dynamic Sitemap creation for NextJS based projects
const express = require('express');
const next = require('next');
const sm = require('sitemap');
const axios = require('axios');
const port = parseInt(process.env.PORT, 10) || 3000;
const dev = process.env.NODE_ENV !== 'production';
const app = next({ dev });
const handle = app.getRequestHandler();