Skip to content

Instantly share code, notes, and snippets.

View BulzyKrown's full-sized avatar
✔️
Verified Bot Developer in Discord

BulzyKrown BulzyKrown

✔️
Verified Bot Developer in Discord
View GitHub Profile
@mbleigh
mbleigh / README.md
Last active July 10, 2024 10:08
Firebase Hosting Fetch All Files

Fetch All Files from Firebase Hosting

This script fetches all of the files from the currently deployed version of a Firebase Hosting site. You must be signed in via the Firebase CLI and have "Site Viewer" permission on the site in question to be able to properly run the script.

Running via NPX

npx https://gist.github.com/mbleigh/9c8680cf319ace2f506f57380da66e7d <site_name>
@bradtraversy
bradtraversy / node_nginx_ssl.md
Last active July 22, 2024 05:09
Node app deploy with nginx & SSL

Node.js Deployment

Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt

1. Sign up for Digital Ocean

If you use the referal link below, you get $10 free (1 or 2 months) https://m.do.co/c/5424d440c63a

2. Create a droplet and log in via ssh

I will be using the root user, but would suggest creating a new user

@AngelMunoz
AngelMunoz / read-write.js
Created September 22, 2016 03:59
leeer y escribir archivos en nodejs con node v6.0+
// importamos la libreria
const fs = require('fs');
//puede llevar cualquier nombre, generalmente
// se sigue la convencion de usar el mismo nombre que la libreria
// fs es parte de la libreria estandard
/**
* @param {string} directorio de destino
* @param {string} texto a escribir dentro del archivo
@BCasal
BCasal / Colaborar Proyecto GitHub.markdown
Last active July 1, 2024 07:35
Pasos a seguir para colaborar en un proyecto de GitHub

Cómo colaborar en un proyecto en GitHub

  • Fork del repositorio
  • Clonar el repositorio
  • Actualizar la rama master
  • Crear una rama
  • Hacer los cambios
  • Hacer un Pull Request

Fork del repositorio

@codepunkt
codepunkt / app.js
Created May 31, 2011 18:50
ExpressJS: set/delete cookies
// Dependencies.
var express = require('express')
app = module.exports = express.createServer(),
del = function(req, res) { res.clearCookie('login_token'); res.redirect('/'); },
set = function(req, res) { res.cookie('login_token', +new Date(), { maxAge: 3600000, path: '/' }); res.redirect('/'); };
// Config
app.configure(function() {
app.use(express.bodyParser());
app.use(express.cookieParser());