Skip to content

Instantly share code, notes, and snippets.

View antoniopresto's full-sized avatar

Antonio Silva antoniopresto

View GitHub Profile
@antoniopresto
antoniopresto / clear-webstorm-cache.sh
Created February 16, 2024 02:20
Clear WebStorm cache
# https://www.jetbrains.com/help/webstorm/directories-used-by-the-ide-to-store-settings-caches-plugins-and-logs.html#plugins-directory
rm -rf ~/Library/Caches/JetBrains/WebStorm*
export PATH=$HOME/bin:/usr/local/bin:$PATH
export PATH=/Users/$USER/.pyenv/versions/2.7.18/bin:$PATH
alias reload="source ~/.zshrc"
alias w="webstorm"
alias zshrc="idea ~/.zshrc"
alias i="pm install"
alias rr="cargo-watch -x run"
echopm(){
#!/bin/bash
# Check if an argument is provided
if [ "$#" -ne 1 ]; then
echo "Usage: $0 <path_to_Dockerfile | image_name>"
exit 1
fi
# Function to list the contents of a Docker image in a tree format
list_image_contents() {
@antoniopresto
antoniopresto / pnpm_bun_docker.md
Created January 23, 2025 23:44
PNPM with Bun.js and Docker

Here i'm creating a simple sh script to redirect the node command to bun.

#!/usr/bin/env sh
# pnpm requires node, so we use this script as an alias on docker;
if [ "$1" = "--version" ]; then
  echo "v20.11.1"
else
  command bun "$@"
fi
[package]
name = "wasm-validator"
version = "0.1.0"
edition = "2021"
description = "A WebAssembly JSON schema validator"
[lib]
crate-type = ["cdylib"]
[dependencies]
@antoniopresto
antoniopresto / prettier-plugin-array-line-break.js
Last active July 2, 2025 00:30
prettier-plugin-array-line-break.js - For non-empty arrays, force them to break into multiple lines
/**
* @prettier
*/
import { doc } from 'prettier';
import { printers as estreePrinters } from 'prettier/plugins/estree';
const originalEstreePrinter = estreePrinters.estree;
const { group, indent, line, join, ifBreak } = doc.builders;
const DEFAULT_THRESHOLD = 1;
diff --git a/node_modules/react-native/ReactCommon/jsc/JSCRuntime.cpp b/node_modules/react-native/ReactCommon/jsc/JSCRuntime.cpp
index 362d76d..7b00d71 100644
--- a/node_modules/react-native/ReactCommon/jsc/JSCRuntime.cpp
+++ b/node_modules/react-native/ReactCommon/jsc/JSCRuntime.cpp
@@ -368,9 +368,9 @@ JSCRuntime::JSCRuntime(JSGlobalContextRef ctx)
#endif
{
#ifndef NDEBUG
-#ifdef _JSC_HAS_INSPECTABLE
- if (__builtin_available(macOS 13.3, iOS 16.4, tvOS 16.4, *)) {