Skip to content

Instantly share code, notes, and snippets.

View m4n50n's full-sized avatar
🎯
Focusing

Jose Clemente García Rodríguez m4n50n

🎯
Focusing
View GitHub Profile
@jaysonrowe
jaysonrowe / FizzBuzz.js
Created January 11, 2012 01:39
FizzBuzz JavaScript solution
for (var i=1; i <= 20; i++)
{
if (i % 15 == 0)
console.log("FizzBuzz");
else if (i % 3 == 0)
console.log("Fizz");
else if (i % 5 == 0)
console.log("Buzz");
else
console.log(i);
@AlejandroPerezMartin
AlejandroPerezMartin / button-focus-remover.ts
Last active April 11, 2023 15:18
Angular 9+ Directive to remove focus after clicking the specified selector/s
import { Directive, HostListener, ElementRef } from '@angular/core';
/**
* This directive removes focus from the selectors after clicking on them
*/
@Directive({
selector: 'button, a' // your selectors here!
})
export class FocusRemover {
constructor(private elRef: ElementRef) {}
@russianryebread
russianryebread / docker_1.13.0.md
Last active December 7, 2022 10:09
Docker Disk Management

See Used Space

docker system df         # Show docker disk usage, including space reclaimable by pruning

Reclaim Disk Space

docker container prune   # Remove all stopped containers
docker volume prune      # Remove all unused volumes

docker image prune # Remove unused images

@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active November 20, 2024 08:53
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@Villanuevand
Villanuevand / README-español.md
Last active November 20, 2024 05:32
Una plantilla para hacer un buen README.md. Inspirado en el gist de @PurpleBooth => https://gist.github.com/PurpleBooth/109311bb0361f32d87a2

Título del Proyecto

Acá va un párrafo que describa lo que es el proyecto

Comenzando 🚀

Estas instrucciones te permitirán obtener una copia del proyecto en funcionamiento en tu máquina local para propósitos de desarrollo y pruebas.

Mira Deployment para conocer como desplegar el proyecto.

@jonlabelle
jonlabelle / docker_compose_cheatsheet.md
Last active November 14, 2024 15:24
Docker Compose Cheatsheet
@jerhon
jerhon / default.conf
Last active November 23, 2022 07:28
nginx HTTP configuration for SPA, with reverse proxy for API
# Typically I use this file as a boilerplate to configure an nginx docker container
#
# This goes in /etc/nginx/conf.d/default.conf
# If you are reverse proxying an API
upstream api {
server API_SERVER_GOES_HERE:port;
}
server {
@nerdyman
nerdyman / README.md
Last active May 7, 2024 09:25
Prompt a File Download and respect the Content Disposition Header Using Fetch and FileSaver

Prompt a File Download With the Content Disposition Header Using JavaScript

Set the Server Response Headers

Expose the Content-Disposition header using the Access-Control-Expose-Headers header and set the Content-Disposition header as you would usually.

Access-Control-Expose-Headers: Content-Disposition
Content-Disposition: attachment; filename="example-file.csv"
@maxoja
maxoja / server-setup-guide.txt
Created October 28, 2020 02:36
Personal Server Setup Guide [Nginx, SSL, IONOS, GoDaddy, Crontab]
----------------------------------
Domain Parking for IONOS Server
----------------------------------
- Go to domain & ssl section
- Add external domain
- Use Godaddy's name servers
- Add verify record on GoDaddy
- Add A record on GoDaddy linking to the server IP
* Changing DNS Records takes some time to update depending on TTL
@hchocobar
hchocobar / dom.md
Last active January 20, 2023 17:30
DOM - Document Object Model

DOM - Document Object Model

Qué es el DOM?

  • El DOM es una API (interfaz de programación de aplicaciones) definida por el Consorcio World Wide Web (W3C) para acceder y modificar documentos XML.
  • El DOM es una utilidad disponible para la mayoría de lenguajes de programación (JavaScript, Java, PHP, Python) y cuyas únicas diferencias se encuentran en la forma de implementarlo.

Para qué sirve el DOM?

  • El DOM permite a los desarrolladores frontend: