Skip to content

Instantly share code, notes, and snippets.

View exil0867's full-sized avatar
🤍
We're back.

Exil exil0867

🤍
We're back.
View GitHub Profile
@sindresorhus
sindresorhus / esm-package.md
Last active May 22, 2024 09:14
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
@getify
getify / 1.html
Last active May 10, 2023 03:25
Ever noticed how vw/vh units in CSS seem to be a bit unreliable on various devices (especially mobile)? Here's my solution.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0">
<title>Test Page</title>
<script>
// early compute the vw/vh units more reliably than CSS does itself
computeViewportDimensions();
@PatheticMustan
PatheticMustan / Discord Tag Rerolling.md
Last active May 26, 2023 04:04
My notes on Discord tag re-rolling.

Discord Tag Rolling

When many users want to use a username that's taken, most software platforms solve this by just forcing them to choose another username. Discord has an interesting solution to this problem: giving people random 4 digit tags as well as their usernames! This allows for many users to have the same username while allowing each person to have a unique username that's easy to remember.

Some notes:

  • Discord's tag system makes it possible to have 9_999 people with the same username, but they limit people from using popular names at a certain point.
  • Discord's Nitro subscription system allows users to change their tag to any untaken tag. Their tags are randomized once their Nitro subscription ends.
  • There is a rate limit of 2 name/tag changes per hour.
@bradtraversy
bradtraversy / node_nginx_ssl.md
Last active May 21, 2024 22:10
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

@A6GibKm
A6GibKm / codecs.org
Last active October 9, 2023 15:38
Multimedia codecs in Fedora

Multimedia codecs in Fedora

Enabling rpm-fusion repositories

Most codecs contains pieces of software which are not free or cannot be included in Fedora repositories so adding rpm-fusion’s repository is required

  • Fedora (22 and later):
        
@EnigmaCurry
EnigmaCurry / README.md
Last active February 25, 2024 02:33
Proxmox install log on bare metal

Proxmox install log on Bare Metal

Assumptions

  • A single node proxmox v5.4-3 install
  • Only one public IP address
  • LXC/KVM for "pet" (development) containers
  • Portainer / Docker for less stateful more automated use-cases
  • My server's FQDN is stardust.gtown.lan.rymcg.tech - use your own domain name.
@gmag11
gmag11 / rclone-mount@.service
Last active March 27, 2024 04:01
Mount multiple RClone remotes on boot with a single SystemD forking service definition
# Rclone mount on boot
# Copy file to: /etc/systemd/system
# You need to create a remote on RClone and a folder on your disk, both with same name <rclone-remote>
# This example uses /cloud/ folder as origin to mount all remotes, change it to your needs
# This example use a linux user named rclone. Create it or adapt it to your needs. Rclone will get config from that user's home folder
# Register new service by typing:
# sudo systemctl daemon-reload
# Do the next one for every remote you want to load on boot
# sudo systemctl enable rclone-mount@<rclone-remote>.service
# systemctl start rclone-mount@<rclone-remote>.service
# This is a blocklist to block samsung smart tv's sending meta data at home.
# Please help to collect domains!
# It could be that the TV does not receive any more updates or other services no longer work. Please report such an incident.
device-metrics-us.amazon.com
samsungacr.com
samsungcloudsolution.com
samsungcloudsolution.net
pavv.co.kr
samsungotn.net
@jeromecoupe
jeromecoupe / webstoemp-gulpfile.js
Last active January 21, 2024 16:28
Gulp 4 sample gulpfile.js. For a full explanation, have a look at https://www.webstoemp.com/blog/switching-to-gulp4/
"use strict";
// Load plugins
const autoprefixer = require("autoprefixer");
const browsersync = require("browser-sync").create();
const cp = require("child_process");
const cssnano = require("cssnano");
const del = require("del");
const eslint = require("gulp-eslint");
const gulp = require("gulp");
@cprakashagr
cprakashagr / LICENCE SUBLIME TEXT
Last active May 1, 2024 10:50
Sublime Text 3 Serial key build is 3143
## Sublime Text 3 Serial key build is 3103
—– BEGIN LICENSE —–
Michael Barnes
Single User License
EA7E-821385
8A353C41 872A0D5C DF9B2950 AFF6F667
C458EA6D 8EA3C286 98D1D650 131A97AB
AA919AEC EF20E143 B361B1E7 4C8B7F04
B085E65E 2F5F5360 8489D422 FB8FC1AA