Skip to content

Instantly share code, notes, and snippets.

View irvingvjuarez's full-sized avatar
🔥
On fire

Irving Juárez irvingvjuarez

🔥
On fire
View GitHub Profile
@irvingvjuarez
irvingvjuarez / py.md
Last active February 19, 2023 13:44
Command to create a virtual environment in windows

1 - Being Into the project where the environment will be created.

2 - Create the virtual environment: python -m venv [env_name]

3 - Activate the virtual environment in CMD: [env_name]\Scripts\activate.bat or source env/bin/activate

4 - Deactivate virtual environment: [env_name]\Scripts\deactivate.bat or deactivate

@irvingvjuarez
irvingvjuarez / Input.tsx
Created December 22, 2022 18:26
How to type a forwardRef component in TS
export const Input = React.forwardRef<refType, propsType>((props, ref) => {
return (
<input ref={ref} />
)
})
@irvingvjuarez
irvingvjuarez / tsconfig.json
Created December 20, 2022 17:50
How to add path aliases in a vite + ts project
{
"compilerOptions": {
...
"paths": {
"@app/*": ["./src/*"]
}
}
}
@irvingvjuarez
irvingvjuarez / postFetch.js
Created December 8, 2022 21:37
Main structure to make a post fetch in js
const fetchConfig = {
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
method: "POST",
body: JSON.stringify(data)
}
fetch(API, fetchConfig)
@irvingvjuarez
irvingvjuarez / gist:e1ba7dcca2a78642e9f9aebbdcf17fcd
Created November 30, 2022 16:25
When git throws the following error: "error: invalid path"
git config core.protectNTFS false
@irvingvjuarez
irvingvjuarez / .editorconfig
Created September 7, 2022 03:06
Editor configuration for my personal projects
# Editor configuration
root = true
[*]
charset = utf-8
indent_style = tab
indent_size = 2
insert_final_newline = false
trim_trailing_whitespace = true
@irvingvjuarez
irvingvjuarez / fetch-forked-repo.ssh
Created August 27, 2022 22:46
How to fetch the latest version from a forked repo
#Once in your forked repo
$ cd PROJECT_NAME
$ git remote add upstream https://github.com/ORIGINAL_OWNER/ORIGINAL_REPOSITORY.git
#If you already did the above step, just fun the following commands
$ git fetch upstream
$ git merge upstream/master master
@irvingvjuarez
irvingvjuarez / legacy-provider.ssh
Created July 31, 2022 20:18
Code when the Node version doesn't match
export NODE_OPTIONS=--openssl-legacy-provider
.glassmorphism {
background: rgba( 255, 255, 255, 0.25 );
box-shadow: 0 8px 32px 0 rgba( 31, 38, 135, 0.37 );
backdrop-filter: blur( 4px );
-webkit-backdrop-filter: blur( 4px );
border-radius: 10px;
border: 1px solid rgba( 255, 255, 255, 0.18 );
}
@irvingvjuarez
irvingvjuarez / manifest.json
Created June 10, 2022 17:32
PWA Web Manifest
{
"short_name": "React App",
"name": "Create React App", //Might be a larger name
"icons": [
{
"src": "icon192.png",
"sizes": "192x192",
"type": "image/png" //png | jpg | svg
},
{