Skip to content

Instantly share code, notes, and snippets.

View mentasuave01's full-sized avatar
:copilot:
πŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒ

mentasuave01

:copilot:
πŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒπŸƒ
View GitHub Profile
@mentasuave01
mentasuave01 / installCursor.sh
Created November 1, 2024 08:58
Install cursor as a desktop app
#!/bin/bash
# Check if script is run as root
if [ "$EUID" -ne 0 ]; then
echo "Please run this script with sudo"
exit 1
fi
# Ask for the cursor filename
read -p "Enter the Cursor AppImage filename (without .AppImage extension): " cursorFileName
@mentasuave01
mentasuave01 / css resets
Last active March 11, 2024 18:15
CSS resets
/*
1. Apply a more intuitive box-sizing model across all elements and pseudo-elements.
This model includes padding and border in an element's total width and height,
making it easier to size elements.
*/
*, *::before, *::after {
box-sizing: border-box;
}
@mentasuave01
mentasuave01 / xBOO_APR.js
Last active August 4, 2022 09:16
SpookySwap_xBOO_APR_Calculations, this script enables to calculate xBOO apr with the time average desired
//Create Fura Headers
var furaHeaders = new Headers();
furaHeaders.append("sec-ch-ua", "\".Not/A)Brand\";v=\"99\", \"Google Chrome\";v=\"103\", \"Chromium\";v=\"103\"");
furaHeaders.append("accept", "*/*");
furaHeaders.append("content-type", "application/json");
furaHeaders.append("sec-ch-ua-mobile", "?0");
furaHeaders.append("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36");
furaHeaders.append("sec-ch-ua-platform", "\"Windows\"");
furaHeaders.append("Sec-Fetch-Site", "cross-site");
furaHeaders.append("Sec-Fetch-Mode", "cors");
@mentasuave01
mentasuave01 / arrayprototypes.jsx
Created July 28, 2022 20:40
How to use array prototypes on signals solidjs (useState in react)
//How to use array prototypes in a simple way from signals
import { createSignal,createEffect } from "solid-js";
const [ownedCats, setOwnedCats] = createSignal([]);
let OwnedCatList = [];
function App() {
@mentasuave01
mentasuave01 / multicheckbox.jsx
Created July 28, 2022 20:33
Solidjs multiple checkbox (could work also for react with some tricks) the simple way
//Just an example of a gallery, using this method you don't need index and useState and other expensive tricks
<input type="checkbox" class="bBox" onClick={() => handleChange(photo.tokenId)} />
let IDs=[];
const handleChange = (ID) => {
//push to an array, if the id is in the array, remove it, if not, add it
if (IDs.includes(ID)) {
IDs = IDs.filter((id) => id !== ID);
@mentasuave01
mentasuave01 / discord-webhook.js
Created March 20, 2022 21:51 — forked from dragonwocky/discord-webhook.js
js post request example for discord webhooks using the fetch web api
fetch(
'https://discordapp.com/api/webhooks/738983040323289120/mzhXrZz0hqOuUaPUjB_RBTE8XJUFLe8fe9mgeJjQCaxjHX14c3SW3ZR199_CDEI-xT56',
{
method: 'post',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
// the username to be displayed
username: 'webhook',