This file contains hidden or 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
import fs from 'fs'; | |
import path from 'path'; | |
const loadNextConfigs = async (rootFolder) => { | |
return ( | |
await Promise.all( | |
fs | |
.readdirSync(rootFolder, { withFileTypes: true }) | |
.filter((dirent) => dirent.isDirectory()) | |
.map(async ({ name }) => { |
This file contains hidden or 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
import React from 'react'; | |
import classNames from 'classnames'; | |
import usePwa from '../hooks/usePwa'; | |
import { useTranslation } from 'modules/i18n'; // Make sure to import useTranslation | |
type InstallPwaInstructionsProps = React.HTMLAttributes<HTMLDivElement> & { | |
// TODO | |
}; | |
const InstallPwaInstructions: React.FC<InstallPwaInstructionsProps> = ({ className, ...props }) => { |

This file contains hidden or 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
// Luhn algorithm to validate the SIRET number | |
const luhnCheck = (num?: string) => { | |
if (!num) { | |
return false; | |
} | |
let arr = (num + '') | |
.split('') | |
.reverse() | |
.map((x) => parseInt(x)); | |
let lastDigit = arr.splice(0, 1)[0]; |
This file contains hidden or 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
import type { AppProps } from 'next/app'; | |
import React from 'react'; | |
import { useToggle } from 'react-use'; | |
export const GeoDataContext = React.createContext({ | |
geoData: undefined as GeoData | undefined, | |
}); | |
export interface GeoData { | |
ip: string; |
This file contains hidden or 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
import React from 'react'; | |
import { useIntersection } from 'react-use'; | |
const App = () => { | |
const intersectionRef = React.useRef(null); | |
const intersection = useIntersection(intersectionRef, { | |
root: null, | |
rootMargin: '0px', | |
threshold: 1, |
This file contains hidden or 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
#!/bin/bash | |
git_clone_gist() { | |
# The URL of the gist is the first argument to the script | |
gist_url=$1 | |
# Use the GitHub API to get the name of the first file in the gist | |
gist_id=$(basename $gist_url) | |
api_url="https://api.github.com/gists/$gist_id" | |
json=$(curl -s $api_url) |

This file contains hidden or 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
// ==UserScript== | |
// @name Twitter better list | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Add nb followers and following directly in feed | |
// @author Martin Ratinaud | |
// @match https://twitter.com/* | |
// @grant none | |
// ==/UserScript== |
This file contains hidden or 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 NEXT_PUBLIC_GTM_ID = process.env.NEXT_PUBLIC_GTM_ID; | |
const NEXT_PUBLIC_HOTJAR_ID = process.env.NEXT_PUBLIC_HOTJAR_ID; | |
import React from 'react'; | |
import Script from 'next/script'; | |
import Delayed from 'modules/Common/components/Delayed'; | |
export default function HeadTag() { | |
return ( | |
<> | |
{NEXT_PUBLIC_GTM_ID && ( |
NewerOlder