Skip to content

Instantly share code, notes, and snippets.

@Ryan2018-js
Ryan2018-js / ios-fixed-scrolling-fix.css
Created October 12, 2022 07:03 — forked from nicolaskopp/ios-fixed-scrolling-fix.css
Fix scrolling bug on iOS Safari with fixed elements and bottom bar
body.noscroll {
height: 100%;
overflow: hidden; /* make sure iOS does not try to scroll the body first */
}
/* your wrapper, most likely mobile menu */
.fixed-wrapper {
width: 100%;
position: fixed;
top: 0px; /* adding px unit also seems to be important for whatever reason, albeit I think we all concur that this should be unitless */
@Ryan2018-js
Ryan2018-js / ios-fixed-scrolling-fix.css
Created October 12, 2022 07:03 — forked from nicolaskopp/ios-fixed-scrolling-fix.css
Fix scrolling bug on iOS Safari with fixed elements and bottom bar
body.noscroll {
height: 100%;
overflow: hidden; /* make sure iOS does not try to scroll the body first */
}
/* your wrapper, most likely mobile menu */
.fixed-wrapper {
width: 100%;
position: fixed;
top: 0px; /* adding px unit also seems to be important for whatever reason, albeit I think we all concur that this should be unitless */
@Ryan2018-js
Ryan2018-js / node_redis_cache.js
Created May 18, 2022 00:40 — forked from bradtraversy/node_redis_cache.js
Node.js & Redis Caching
const express = require('express');
const fetch = require('node-fetch');
const redis = require('redis');
const PORT = process.env.PORT || 5000;
const REDIS_PORT = process.env.PORT || 6379;
const client = redis.createClient(REDIS_PORT);
const app = express();
@Ryan2018-js
Ryan2018-js / node_nginx_ssl.md
Created May 18, 2022 00:40 — forked from bradtraversy/node_nginx_ssl.md
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