Skip to content

Instantly share code, notes, and snippets.

@LeoDog896
LeoDog896 / parcel-init.sh
Created December 31, 2022 00:11
parcel-init
JSON=$(cat <<EOF
{
"private": true,
"scripts": {
"start": "parcel index.html",
"build": "parcel build index.html --public-url ./",
"format": "prettier --write ."
},
"dependencies": {
@Widdershin
Widdershin / ssr.md
Last active May 1, 2024 17:36
The absurd complexity of server-side rendering

In the olden days, HTML was prepared by the server, and JavaScript was little more than a garnish, considered by some to have a soapy taste.

After a fashion, it was decided that sometimes our HTML is best rendered by JavaScript, running in a user's browser. While some would decry this new-found intimacy, the age of interactivity had begun.

But all was not right in the world. Somewhere along the way, we had slipped. Our pages went uncrawled by Bing, time to first meaningful paint grew faster than npm, and it became clear: something must be done.

And so it was decided that the applications first forged for the browser would also run on the server. We would render our HTML using the same logic on the server and the browser, and reap the advantages of both worlds. In a confusing series of events a name for this approach was agreed upon: Server-side rendering. What could go wrong?

In dark rooms, in hushed tones, we speak of colours.

@LeoDog896
LeoDog896 / TEXT.md
Last active February 16, 2022 13:26
USB 3.0 ports not working? (Minus Forum -- may or may not work for devices)

How to fix USB Ports and internet on AMD CPUs

  1. Disable IOMMU in your BIOS
  2. In /etc/default/grub, add "iommu=soft" to GRUB_CMD_LINUX (if there is already content in there, ex "rhgb quiet", append iommu=soft to it, EX GRUB_CMD_LINUX="rhgb quiet iommu=soft")

Why?

Krister explains the changes really well in his blog

@tianhaoz95
tianhaoz95 / open-in-gitpod.md
Last active February 29, 2024 21:43
Code to add a open in Gitpod badge

Here is your awesome Open in Gitpod badge

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/[your GitHub username]/[your repository])

Open in Gitpod

@MightyPork
MightyPork / usb_hid_keys.h
Last active May 1, 2024 05:11
USB HID Keyboard scan codes
/**
* USB HID Keyboard scan codes as per USB spec 1.11
* plus some additional codes
*
* Created by MightyPork, 2016
* Public domain
*
* Adapted from:
* https://source.android.com/devices/input/keyboard-devices.html
*/