Skip to content

Instantly share code, notes, and snippets.

View tacomilkshake's full-sized avatar
🤩

tacomilkshake

🤩
View GitHub Profile
// Batch-delete videos from YouTube’s “Watch later” playlist
// Paste the following code into a browser console while the playlist is open
// Code based on: https://gist.github.com/astamicu/eb351ce10451f1a51b71a1287d36880f?permalink_comment_id=4087416#gistcomment-4087416
//
// (Suggestions for improvement welcome. My approach for waiting for the .click() to finish, feels hacky.)
const pause = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
async function remove() {
for (let i=0; i < 100; i++) {
document.querySelector('#primary button[aria-label="Action menu"]').click();
@Kranzes
Kranzes / guide.md
Last active July 17, 2024 05:07
SSH Resident Key Guide

Initial checks

Start by checking that there aren't any previous ssh keys inside the FIDO2 authenticator of your YubiKey. You can check if they exist by running the command below:

nix shell nixpkgs#yubikey-manager -c ykman fido credentials list

If the command above outputs a string mentioning "ssh" or "openssh", then you have already got a key generated and store on your YubiKey.

Evaluating additional authentication factors

Before generating a new ssh key to store on your YubiKey you must consider which additional required authentication factors you want to use. Below you can see a table with the available factors and their corresponding command:

@keilmillerjr
keilmillerjr / Creating an AUR Package.md
Last active June 6, 2024 14:49
How to create and manage an AUR package. #AUR #ARCH #makepkg #PKGBUILD
@danbst
danbst / home-etc.nix
Created December 27, 2019 15:17
Manage your /etc from home-manager (install home-manager as root)
{ config, pkgs, lib, ... }: {
imports = [
(import <nixpkgs/nixos/modules/system/etc/etc.nix>)
];
options.system.build.etc = lib.mkOption { type = lib.types.package; };
options.system.activationScripts.etc =
lib.mkOption { type = lib.types.unspecified; };
config = {
@shaneutt
shaneutt / LICENSE
Last active July 18, 2024 10:14
Golang: Demonstrate creating a CA Certificate, and Creating and Signing Certs with the CA
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
@matthewzring
matthewzring / markdown-text-101.md
Last active July 19, 2024 04:32
A guide to Markdown on Discord.

Markdown Text 101

Want to inject some flavor into your everyday text chat? You're in luck! Discord uses Markdown, a simple plain text formatting system that'll help you make your sentences stand out. Here's how to do it! Just add a few characters before & after your desired text to change your text! I'll show you some examples...

What this guide covers:

@CMCDragonkai
CMCDragonkai / building_a_nix_package_c&c++.md
Last active April 8, 2024 16:38
Building a Nix Package (The C&C++ Version)

Building a Nix Package (The C&C++ Version)

Nix can be used to build any kind of package. But here I'm just going to focus on the simple C&C++ case.

Firstly we have to know that the final built packages will located inside /nix/store. Which is globally readable directory of all build inputs and build outputs of the Nix system. The emphasis is on readable, not writable, that is /nix/store is meant to be modified by the user or programs except for the Nix system utilities. This centralises the management of packages, and keeps our packages and package configuration consistent.

So what exactly are we trying to build. Our goal is to build a directory that will be located in /nix/store/*-package-version/, where * is the hash of the package. Preferably a version is also available, but some C&C++ packages don't have versions, so in that case, there's only /nix/store/*-package/.

What will be inside this directory? It follows the GNU Coding Standards descri