Skip to content

Instantly share code, notes, and snippets.

@armandabric
armandabric / fixNextJsStandaloneSymbolicLink.mjs
Created May 26, 2026 08:07
Fix next.js tubopack symlink to be able to containerize the build output. See https://github.com/vercel/next.js/issues/88844
set -x DOCKER_BUILDKIT 1
set -x COMPOSE_DOCKER_CLI_BUILD 1
set -x USER_ID (id -u)
abbr --add d docker
abbr --add dc docker compose
import { z } from "zod";
test("should ignore the bars entries with the unknown type", () => {
enum BarType {
Big = "big",
Small = "small",
}
const schema = z.object({
foo_id: z.string(),
import SanityImage from "./SanityImage";
import { render, fireEvent } from "test/componentUtils";
describe("SanityImage", () => {
it("render from an URL", () => {
const { getByText, debug } = render(<SanityImage src="https://foo.fr/" />);
debug();
expect(getByText("May 2, 2020 - May 6, 2020")).toBeInTheDocument();
@armandabric
armandabric / README.md
Last active April 16, 2021 10:22
IBE redesign

To be saved here

{
"polyfillFiles": [
"static/chunks/polyfills-5bc0b8d36c2b6304bade.js"
],
"devFiles": [],
"ampDevFiles": [],
"lowPriorityFiles": [
"static/6jguHQCPoq8JMqVGIXI47/_buildManifest.js",
"static/6jguHQCPoq8JMqVGIXI47/_ssgManifest.js"
],
{
"offer_id": "MON-TWIN-DOUBLE",
"room_id": "MON-DOUBLE",
"total_price": {
"amount": "79.00",
"currency": "EUR"
},
"total_price_to_pay": {
"amount": "85.00",
"currency": "EUR"
$ npm install --verbose gulp-uglifycss@1.0.7
npm info it worked if it ends with ok
npm verb cli [ '/Users/spy-seth/.nvm/versions/node/v6.9.4/bin/node',
npm verb cli '/Users/spy-seth/.nvm/versions/node/v6.9.4/bin/npm',
npm verb cli 'install',
npm verb cli '--verbose',
npm verb cli 'gulp-uglifycss@1.0.7' ]
npm info using npm@3.10.10
npm info using node@v6.9.4
npm verb get https://registry.npmjs.org/gulp-uglifycss not expired, no request
@armandabric
armandabric / postcss-plugin-ignore-warning.js
Created December 9, 2016 10:12
A plugin to ignore some warning. Use it with caution.
/* @flow */
import postcss from 'postcss';
const ignoreMessage = postcss.plugin('postcss-plugin-ignore-warning', (opts) => {
const patternToIgnores = opts || [];
return (root, result) => {
if (patternToIgnores.lenght === 0) {
return;
@armandabric
armandabric / doBar.js
Last active December 21, 2016 09:49
Jest mock function bug reproduction case (see issue https://github.com/facebook/jest/issues/2116)
export default () => {
return 51;
};