Skip to content

Instantly share code, notes, and snippets.

View vagnerlandio's full-sized avatar
🎯
Focusing

Vagnerlandio Nunes vagnerlandio

🎯
Focusing
View GitHub Profile
@vagnerlandio
vagnerlandio / bash.sh
Created December 24, 2022 08:00
Fix Android Emulator unusable on BTRFS partition (very slow, freezing and worse fonts)
echo "QuickbootFileBacked = off" >> ~/.android/advancedFeatures.ini
@vagnerlandio
vagnerlandio / react-native-android-studio-no-wsl2.md
Created February 4, 2023 22:22 — forked from georgealan/react-native-android-studio-no-wsl2.md
React Native no Emulador Android Studio com WSL2

REACT-NATIVE PROJECTS RUN IN WSL2 UBUNTU 22.04 WITH BACKEND API

📆 Article written day: 9/03/2020 📆 Article updated day: 6/18/2022

My System Specs:

  • Microsoft Windows 10 Enterprise Version 21H2 (OS Build 19044.1766)
  • WSL2 - Ubuntu 22.04 LTS
  • Android Studio Version: Chipmunk 2021.2.1 Patch 1
@vagnerlandio
vagnerlandio / index.ts
Created May 15, 2023 15:04
TypeScript function to simulate React.useState with callback
import { useStateWithCallback } from './useStateWithCallback';
function MyComponent() {
const [count, setCount] = useStateWithCallback(0, (value) => {
console.log(`Count updated: ${value}`);
});
function increment() {
setCount(count + 1, () => {
console.log(`Count incremented: ${count + 1}`);
@vagnerlandio
vagnerlandio / readme.md
Created May 23, 2023 13:33
Separate and organize multiple projects build commands defined in a single package.json file

If you have a large number of Angular projects and defining individual build commands for each project in the package.json file becomes unwieldy, you can consider using a different approach to organize your build commands. Here are a few suggestions:

  1. Create a separate configuration file: Instead of cluttering your package.json file with multiple build commands, you can create a separate configuration file (e.g., angular-projects.json) to store the build configurations for each project. In this file, you can define an array of objects, where each object represents a project and its corresponding build command.

Example angular-projects.json:

[
  {
 "name": "ProjectA",
@vagnerlandio
vagnerlandio / rn-with-wsl-wsa.md
Created July 22, 2023 16:42 — forked from nkt217/rn-with-wsl-wsa.md
Develop React Native app with WSL and WSA

Develop React Native app with WSL and WSA

Requirement

  • Windows Subsystem for Linux 2 (WSL2)
  • Windows Subsystem for Android (WSA)
  • NodeJS install inside WSL2

Steps

WSA

@vagnerlandio
vagnerlandio / macOS_Silverback-Debloater.sh
Created November 19, 2024 05:40
macOS Silverback Debloater
#!/bin/bash
# macOS Silverback Debloater
# v1.0 by Wamphyre
# Disabling SIP is required ("csrutil disable" from Terminal in Recovery)
# Modifications are written in /private/var/db/com.apple.xpc.launchd/ disabled.plist, disabled.501.plist
# To revert, delete /private/var/db/com.apple.xpc.launchd/ disabled.plist and disabled.501.plist and reboot; sudo rm -r /private/var/db/com.apple.xpc.launchd/*
# Disabling Spotlight