Skip to content

Instantly share code, notes, and snippets.

View bpetetot's full-sized avatar

Benjamin Petetot bpetetot

View GitHub Profile
@bpetetot
bpetetot / script.sh
Created November 26, 2019 09:21
Identify unused files with webpack
echo "Generating resolved modules list by webpack..."
npx webpack --display-modules --config webpack.config.js | awk '{print $2}' | grep ^\.\/ > files-webpack.txt
echo "Generating files list from src folder..."
find ./src -name "*.js" | grep -v eslint | grep -v stories | grep -v __ > ./files-src.txt
echo "Identify unused files..."
cat files-src.txt | xargs -I '{}' sh -c "grep -q '{}' files-webpack.txt || echo '{}'"
rm files-src.txt files-webpack.txt
import firebase from 'firebase/app'
import React, { useState, useEffect, useContext } from 'react'
import { useStorage } from 'services/storage'
import { useNetwork } from 'services/network'
const AuthContext = React.createContext()
export const useAuth = () => useContext(AuthContext)
@bpetetot
bpetetot / docker-compose.yml
Last active October 10, 2022 11:00
Docker Seedbox
plex:
image: linuxserver/plex
container_name: plex
net: host
environment:
- VERSION=latest
- PUID=1000
- PGID=1001
- TZ=Europe/Paris
volumes: