Skip to content

Instantly share code, notes, and snippets.

View manufosela's full-sized avatar
🏠
Working from home

Mánu Fosela manufosela

🏠
Working from home
View GitHub Profile
@manufosela
manufosela / __dirname.js
Created August 16, 2023 11:30
__dirname in Node ESModules files
import path from "path";
import { fileURLToPath } from "url";
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
@manufosela
manufosela / border-radius-nested-elements.css
Created August 11, 2023 10:49
Border radius nested elements using css variable
.parent {
--nested-radius: calc(var(--radius) - var(--padding));
}
.nested {
border-radius: var(--nested-radius);
}
.snow:nth-child(1) {
opacity: 0.5368;
transform: translate(60.2222vw, -10px) scale (0.6037); animation: fall-1 16s -7s linear infinite;
}
@keyframes fall-1 {
66.503% {
transform: translate (58.5861vw, 66.503vh) scale (0.6037);
}
to {
@manufosela
manufosela / Eliminar_env_github.txt
Last active June 13, 2023 06:33
Cómo eliminar un fichero .env subido por error a github
# Eliminar .env subido por error de github
# Lo primero: Añadir".env" en .gitignore
git rm -r --cached .env
git push
git filter-branch --index-filter "git rm -rf --cached --ignore-unmatch .env" HEAD
git push --force.
import { fileURLToPath } from 'url'
const _dirname = fileURLToPath(new URL('.', import.meta.url))
// => '/Users/davideast/Documents/vite-is-awesome/dirname'
@manufosela
manufosela / firestore.service.ts
Created June 26, 2022 17:53 — forked from evlymn/firestore.service.ts
Firestore Basics, Modular Firebase 9
import { Injectable } from '@angular/core';
import { Firestore, collectionData, collection, QueryConstraint } from '@angular/fire/firestore';
import { addDoc, CollectionReference, deleteDoc, doc, getDoc, query, setDoc, updateDoc } from '@firebase/firestore';
import { enableIndexedDbPersistence } from 'firebase/firestore';
@Injectable({
providedIn: 'root'
})
export class FirestoreService {
@manufosela
manufosela / animation-paralax-web-component-with-lit.markdown
Created January 2, 2022 10:25
animation-paralax Web-Component with Lit
@manufosela
manufosela / animation-paralax-web-component-with-lit.markdown
Created January 2, 2022 09:29
animation-paralax Web-Component with Lit
@manufosela
manufosela / animation-paralax-web-component-with-lit.markdown
Created January 2, 2022 09:04
animation-paralax Web-Component with Lit
import axios from 'axios';
export const instance = axios.create({
baseURL: 'YOUR-WEBSITE-URL.COM'
});