Skip to content

Instantly share code, notes, and snippets.

View metafeather's full-sized avatar

Liam Clancy metafeather

View GitHub Profile
@metafeather
metafeather / index.ts
Created January 14, 2025 12:56
a promisified version of setTimeout
// ref: https://mrcoles.com/implementing-sleep-javascript-promise/
const sleep = (delay, resolveValue) => new Promise((resolve) => {
setTimeout(() => resolve(resolveValue), delay);
});
const sleep = <T extends any>(
delay: number,
resolveValue?: T
): Promise<T> =>
@metafeather
metafeather / SlackChannelHide-2024-10-31.user.js
Created October 31, 2024 15:44
Userscript - SlackChannelHide
// ==UserScript==
// @name SlackChannelHide
// @namespace http://metafeather.net/
// @version 2024-10-31
// @description You can hide and open "CHANNELS" on Slack Web Client using Ctrl+S
// @author metafeather
// @match https://app.slack.com/client/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=slack.com
// @grant GM_addStyle
// @run-at document-start

Human Native AI—written evidence (LLM0119) - House of Lords Communications and Digital Select Committee inquiry: Large language models https://committees.parliament.uk/writtenevidence/127523/pdf/

Apple, Nvidia, Anthropic Used Thousands of Swiped YouTube Videos to Train AI https://simonwillison.net/2024/Jul/18/youtube-captions/

✭Apple, Nvidia, Anthropic Used Thousands of Swiped YouTube Videos to Train AI | WIRED https://www.wired.com/story/youtube-training-data-apple-nvidia-anthropic/

✭Breaking Down What’s at Stake in Music’s AI Lawsuits

@metafeather
metafeather / index.md
Last active October 12, 2022 12:53
Learning the ML Tech Stack in 2022
@metafeather
metafeather / README.md
Created April 10, 2022 22:59
Bash test negation with '!'

‎‎​

@metafeather
metafeather / Dockerfile
Last active April 5, 2022 09:19
Personal dev container
# Global args
ARG DEBIAN_VERSION="bullseye-slim"
ARG GOLANG_VERSION="1.17"
ARG NODE_VERSION="16"
ARG PYTHON_VERSION="3.10"
ARG RUBY_VERSION="3.1.0"
############################
# Base images
@metafeather
metafeather / README.md
Last active March 23, 2022 11:02
How To Use Bash Parameter Substitution Like A Pro

The $ character is used for parameter expansion, arithmetic expansion and command substitution. You can use it for manipulating and expanding variables on demands without using external commands such as perl, python, sed or awk. This guide shows you how to use parameter expansion modifiers to transform Bash shell variables for your scripting needs.

@metafeather
metafeather / README.md
Last active March 23, 2022 08:53
shell arguments parsing patterns

Parsing command-line arguments and flags

4th January 2019 | 7 minutes

Today's post is going to be a bit more complex if you're new to shell scripting, but something I found quite beautiful is how one can go about parsing command-line arguments and flags in shell scripting. It works by using a switch-case statement and the shift expression.

Let's take a look!

arguments.sh

@metafeather
metafeather / .. Trunk.io - custom linter: markdown-link-check README.md
Last active November 10, 2022 16:12
Trunk.io - custom linter: markdown-link-check
@metafeather
metafeather / graphiql.vue
Created October 9, 2020 19:36
Load GraphiQL React based UI within a Vue Component from CDN
<template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
<div id="graphiql" style="height: 100vh"></div>
</template>
<script>
// Load GraphiQL React based UI within a Vue Component from CDN
// ref: https://github.com/graphql/graphiql/tree/main/packages/graphiql#cdn-bundle
const js = (id, url) =>
new Promise((resolve, reject) => {
if (document.getElementById(id)) {