Skip to content

Instantly share code, notes, and snippets.

View ericmil87's full-sized avatar
🟢
Available

Eric Milfont ericmil87

🟢
Available
View GitHub Profile
@sacru2red
sacru2red / README.md
Last active January 7, 2023 02:34
next patch ssl

It's for users having ssl files (crt.pem, key.pem)

If you are coding development env, edit 'hosts' file

Like

127.0.0.1    localhost ... local.mydomain.com  ...
  1. install patch-package
@alex-streza
alex-streza / Meta.tsx
Created February 3, 2022 10:42
Simple Meta component to boost NextJS SEO
import { NextSeo } from "next-seo";
import Head from "next/head";
import { useRouter } from "next/router";
type IMetaProps = {
title: string;
description: string;
image?: string;
canonical?: string;
};
@dantldev
dantldev / ScreenshotComponent.js
Last active September 24, 2024 17:35
A workaround to get screenshots from a url on nextjs
/**
* you can call the api route with fetch and will return the base64 blob as json.
* you can use it on a <img /> tag like so:
*/
import { useEffect, useState } from 'react';
export const WebScreenshot = ({ url }) => {
const [data, setData] = useState(null);
useEffect(() => {
fetch(`/api/get-screenshot${url ? `?url=${url}` : ''}`)
@zhangshine
zhangshine / tinymce-react-nextjs.md
Last active November 23, 2024 15:22
NextJs- React - Self hosted TinyMCE
  1. Install (TinyMCE 5.x)
npm install --save tinymce @tinymce/tinymce-react copy-webpack-plugin
  1. Copy static files(tinymce skins) to public folder. Edit file next.config.js
const path = require('path');
const webpack = require('webpack');
const CopyPlugin = require('copy-webpack-plugin');
@strangerstudios
strangerstudios / pmprobuddy_update_user_meta.php
Last active October 18, 2022 20:48
Sync WordPress user meta fields (e.g. those added by PMPro Register Helper) with BuddyPress profile fields.
/*
Sync PMPro fields to BuddyPress profile fields.
*/
function pmprobuddy_update_user_meta($meta_id, $object_id, $meta_key, $meta_value)
{
//make sure buddypress is loaded
do_action('bp_init');
//array of user meta to mirror
$um = array(