Skip to content

Instantly share code, notes, and snippets.

@taskylizard
taskylizard / fmhy.md
Last active April 18, 2024 14:18
/r/freemediaheckyeah, in one single file (view raw)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@shawwn
shawwn / since2010.md
Created May 11, 2021 09:46
"What happened after 2010?"

This was a response to a Hacker News comment asking me what I've been up to since 2010. I'm posting it here since HN rejects it with "that comment is too long." I suppose that's fair, since this ended up being something of an autobiography.

--

What happened after 2010?

@sindresorhus
sindresorhus / esm-package.md
Last active April 19, 2024 10:56
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.
@glubsy
glubsy / howto_record_youtube_livestreams.md
Last active April 16, 2024 14:48
How to properly record Youtube & Twitch live streams

How to record Youtube live streams:

  • use livestream_saver to download from the first segment. Can also record membership-only streams by supplying it your cookies (uses yt-dlp to download)

  • use ytarchive which basically does the same thing, except a bit better.

  • use youtube_stream_capture. You can use cookies file to get member-only streams too. Be aware that this script currently fails to download chunks as soon as the stream has ended (this might be a bug).

  • or use live-dl which does monitoring of streams too. This is a wrapper around streamlink and yt-dlp.

@zeux
zeux / clang27.md
Last active January 27, 2024 11:45
How does clang 2.7 hold up in 2021?

A friend recently learned about Proebsting's law and mentioned it to me off hand. I knew about the law's existence but I never really asked myself - do I believe in it?

For people who aren't aware, Proebsting's law states:

Compiler Advances Double Computing Power Every 18 Years

Which is to say, if you upgrade your compiler every 18 years, you would expect on average your code to double in performance on the same hardware.

Let's C about this

@advaith1
advaith1 / discordjs-slash-commands.md
Last active July 21, 2023 07:11
Slash Commands in Discord.js
@Richienb
Richienb / index.js
Last active June 30, 2020 06:58
internalIp.v4() for browsers
const internalIp = async () => {
if (!RTCPeerConnection) {
throw new Error("Not supported.")
}
const peerConnection = new RTCPeerConnection({ iceServers: [] })
peerConnection.createDataChannel('')
peerConnection.createOffer(peerConnection.setLocalDescription.bind(peerConnection), () => { })
@zbraniecki
zbraniecki / README.md
Last active April 7, 2024 04:42
Rust <--> C/C++ FFI for newbies

As Gecko is moving toward more Rust code, the cases where Rust and C code interoperate will become more common.

This document is an attempt to ease the learning curve for engineers facing it for the first time. It assumes no prior experience with cross-language C interfaces (called FFI).

It also assumes that Rust code is already built into Gecko. If you need help with that, read Introducing Rust code in Firefox.

What can you transfer across the fence

@fworks
fworks / install-zsh-windows-git-bash.md
Last active April 16, 2024 03:53
Zsh / Oh-my-zsh on Windows Git Bash