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 / 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
@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 / 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 / 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 / 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 / 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 / bash.sh
Created April 29, 2022 17:47
fix yarn install sharp@npm:0.23.4 on node v16
yarn install -std=c++17
@vagnerlandio
vagnerlandio / install-photoshop-cs6.md
Created April 26, 2022 17:19 — forked from ansulev/install-photoshop-cs6.md
Install Adobe Photoshop CS6 on Wine (Arch Linux)

Step 1. Install the Wine and Winetricks

  sudo pacman -S wine winetricks

Step 2. Using winetricks to get install dependencies for Photoshop CS6

winetricks atmlib gdiplus msxml3 msxml6 vcrun2005 vcrun2005sp1 vcrun2008 ie6 fontsmooth-rgb gecko
@vagnerlandio
vagnerlandio / a.js
Created January 7, 2022 04:52
marvel api paginação
const response = await axios.get(
`http://gateway.marvel.com/v1/public/comics?ts=${timeStamp}&apikey=${apiKey}&hash=${md5}&limit=20&offset=${
(page - 1) * 20
}`
);
@vagnerlandio
vagnerlandio / gist:1a18abce69e9201081dc9ddb7b754cc4
Last active April 25, 2022 15:21
Execute command in all immediate subdirectories
#!/bin/zsh
# A simple script with a function...
mexec()
{
export THE_COMMAND=$@
find . -type d -maxdepth 1 -mindepth 1 -print0 | xargs -0 -I{} zsh -c 'cd "{}" && echo "*\033[1;32mstart {} start\033[0m*" && echo "$('$THE_COMMAND')" && echo -e "*\033[1;93mend {} end\033[0m*\n"'
}
mexec ls -al