Skip to content

Instantly share code, notes, and snippets.

View belgattitude's full-sized avatar

Sébastien Vanvelthem belgattitude

View GitHub Profile

Comparison

  • Yarn 4.0.0-rc.23: 2+ minutes (constant yarn cache is preserved between lock changes: cache saved in .next/cache/yarn)
  • Pnpm 7.13.x: 4+ mins (cold cache) / 3+ minutes (warm cache)

Deploy size

PS: add NEXT_DEBUG_FUNCTION_SIZE=1 in the vercel envs/

@belgattitude
belgattitude / ci-pnpm-install.md
Last active April 13, 2024 14:14
Composite github action to improve CI time with pnpm

Why

Although @setup/node as a built-in cache option, it lacks an opportunity regarding cache persistence. Depending on usage, the action below might give you faster installs and potentially reduce carbon emissions (♻️🌳❤️).

Requirements

pnpm v7 or v8 (not using pnpm ? see the corresponding yarn action gist)

Bench

@belgattitude
belgattitude / ci-yarn-install.md
Last active April 9, 2024 09:40
Composite github action to improve CI time with yarn 3+ / node-modules linker.
@belgattitude
belgattitude / benchmark-package-managers.md
Last active June 20, 2023 11:19
Package managers comparison from the CI time perspective
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@belgattitude
belgattitude / install_phpexcel_php73.sh
Last active January 17, 2022 01:53
Install script for ilia/php_excel with PHP7.3
#!/bin/bash
#
# Example script to install LibXL, ilia/php_excel on PHP 7.3 (ondrej/ppa)
#
# Usage:
# > sudo ./install_phpexcel_php73.sh
# > sudo service php7.3-fpm reload (if using fpm)
#
# Requirements:
# - Tested with Ubuntu 64bits (14.04, 16.04+)
@belgattitude
belgattitude / video-tracks.scss
Last active October 15, 2018 09:54
Example of subs styling
/* Example of captions styling for FF and Chrome.
* Warning ! Only my prod build includes postcss/autoprefixer work.
* this example needs prefixes
*/
@import '../_variables.scss';
@import '../_media-queries.scss';
$track-font-family: $primary-font, sans-serif;
$track-color: yellow;
@belgattitude
belgattitude / BasicVideoPlayer.tsx
Last active October 1, 2018 11:06
An example of mini video player
import React, {SourceHTMLAttributes, TrackHTMLAttributes, VideoHTMLAttributes} from 'react';
import {Omit} from 'utility-types';
export type VideoSourcesProps = Array<SourceHTMLAttributes<HTMLSourceElement>>;
export type TracksSourcesProps = Array<TrackHTMLAttributes<HTMLTrackElement>>;
export type BasicVideoProps = {
srcs?: VideoSourcesProps;
tracks?: TracksSourcesProps;
playbackRate: number;