Skip to content

Instantly share code, notes, and snippets.

View Pooreffects's full-sized avatar
👨‍💻
A lifelong learner

Mohamed Benabdellah Pooreffects

👨‍💻
A lifelong learner
View GitHub Profile
@Pooreffects
Pooreffects / angular-cli-nx.md
Created February 1, 2025 19:54
Useful Angular CLI and Nx cheatsheet

A cheat sheet for Angular and NX CLI.

Angualar CLI

# Quick start
npm install -g @angular/cli
@Pooreffects
Pooreffects / css-reset.css
Created January 30, 2025 14:20
This Tailwind CSS Reset offers a clean, reusable foundation for your projects. It standardizes styles across browsers, ensuring consistent behavior for elements like scrollbars, form controls, and images. Optimized for both light and dark modes, it includes responsive adjustments for mobile, a frosted glass effect, and customizable filter effect…
@tailwind base;
@tailwind components;
@tailwind utilities;
@layer base {
*,
*::before,
*::after {
margin: 0;
padding: 0;
@Pooreffects
Pooreffects / Scene.js
Created February 16, 2022 19:54
Three.js essentials snippet
const scene = new THREE.Scene()
const camera = new THREE.PerspectiveCamera(75, width / height, 0.1, 1000)
const renderer = new THREE.WebGLRenderer()
renderer.setSize(width, height)
document.querySelector('#canvas-container').appendChild(renderer.domElement)
const mesh = new THREE.Mesh()
mesh.geometry = new THREE.BoxGeometry()
mesh.material = new THREE.MeshStandardMaterial()
@Pooreffects
Pooreffects / debug-horizontal-scroll.js
Created November 20, 2021 19:50
A little trick to expose the element that's creating horizontal scrolling
(function (d) {
var w = d.documentElement.offsetWidth,
t = d.createTreeWalker(d.body, NodeFilter.SHOW_ELEMENT),
b;
while (t.nextNode()) {
b = t.currentNode.getBoundingClientRect();
if (b.right > w || b.left < 0) {
t.currentNode.style.setProperty('outline', '1px dotted red', 'important');
console.log(t.currentNode);
}
@Pooreffects
Pooreffects / loading.vue
Created October 28, 2021 14:49
Preloading page in Vue
<template>
<div v-if="loading">
<div id="loading-page loaded">
<div id="loader opzero">
<div class="particles element">
<div class="spark1 spark element">
<div class="particle1 particle element"></div>
</div>
<div class="spark2 spark element">
<div class="particle2 particle element"></div>
@Pooreffects
Pooreffects / examples.md
Created October 12, 2021 21:58 — forked from jonschlinkert/examples.md
Three files: examples.md, yaml-cheatsheet.md and yaml-cheatsheet.yml

adapted from this blog

# YAML
name: Jon
# YAML
object:
@Pooreffects
Pooreffects / grow-rotation.css
Created September 25, 2021 17:39
Handy Grow Rotation CSS snippet
/* Grow Rotate Animation */
.hvr-grow-rotate {
display: inline-block;
vertical-align: middle;
-webkit-transform: perspective(1px) translateZ(0);
transform: perspective(1px) translateZ(0);
box-shadow: 0 0 1px rgba(0, 0, 0, 0);
-webkit-transition-duration: 0.3s;
transition-duration: 0.3s;
-webkit-transition-property: transform;
@Pooreffects
Pooreffects / basic-express.js
Created September 23, 2021 23:19
A basic express app that get you running off the bat
const express = require('express');
const morgan = require('morgan');
const cors = require('cors');
const app = express();
app.use(morgan('dev'));
app.use(cors());
app.get('/', (req, res) => {