Skip to content

Instantly share code, notes, and snippets.

View Carter2307's full-sized avatar
๐ŸŒ
Working Around the World

B.ROGER Carter2307

๐ŸŒ
Working Around the World
View GitHub Profile
@Carter2307
Carter2307 / global.js
Created July 28, 2023 11:32 — forked from Niq1982/global.js
Load Youtube videos using iFrame API
import ytPlayer from './ytplayer.js';
// Find players from DOM and load if found
const players = document.querySelectorAll('.youtube-player');
players.forEach(player => new ytPlayer(player, {
height: player.dataset.height ? player.dataset.height : 1280,
width: player.dataset.width ? player.dataset.width : 780,
autoplay: player.dataset.autoplay ? player.dataset.autoplay : false,
videoId: player.dataset.videoId ? player.dataset.videoId : false,
}));
@Carter2307
Carter2307 / node_nginx_ssl.md
Created February 18, 2023 22:22 — 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

@Carter2307
Carter2307 / MathHelper.js
Created April 3, 2022 13:35 — forked from demonixis/MathHelper.js
JavaScript Math helper
var MathHelper = {
// Get a value between two values
clamp: function (value, min, max) {
if (value < min) {
return min;
}
else if (value > max) {
return max;
}
@Carter2307
Carter2307 / meta-tags.md
Created August 10, 2021 02:48 — forked from lancejpollard/meta-tags.md
Complete List of HTML Meta Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta name="keywords" content="your, tags"/>
<meta name="description" content="150 words"/>
<meta name="subject" content="your website's subject">
<meta name="copyright"content="company name">
<meta name="language" content="ES">