Skip to content

Instantly share code, notes, and snippets.

View andrioid's full-sized avatar

Andri Óskarsson andrioid

View GitHub Profile
@brittanyellich
brittanyellich / BlueskyComments.tsx
Created August 5, 2025 21:49
Showing Likes and Comments on Bluesky
import React from "react";
export type CommentPost = {
post: {
author: {
did: string;
handle: string;
displayName: string;
avatar: string;
};
@drahtzieher
drahtzieher / sessionstore.go
Created June 27, 2025 15:55
Nats Jetstream KV session store for SCS (with cbor encoder)
package sessionstore
import (
"context"
"fmt"
"time"
"github.com/fxamacker/cbor/v2"
"github.com/nats-io/nats.go/jetstream"
)
package examples
import (
"github.com/XANi/loremipsum"
"github.com/go-chi/chi/v5"
. "github.com/starfederation/datastar-dev/site/shared"
datastar "github.com/starfederation/datastar/sdk/go"
"math/rand/v2"
"net/http"
"time"
@WomB0ComB0
WomB0ComB0 / reusable-providers.tsx
Last active November 18, 2025 01:27
A reusable providers component that almost eliminates the need for context API
'use client';
import type { JSX, JSXElementConstructor, ReactNode } from 'react';
/**
* Infers the props from a given React component constructor type.
*
* @template T - A React component constructor.
* @readonly
*/
@hakerdefo
hakerdefo / sources.list
Created November 28, 2024 16:06
Ubuntu 24.04 LTS (Noble Numbat) complete sources.list
deb http://archive.ubuntu.com/ubuntu/ noble main restricted universe multiverse
#deb-src http://archive.ubuntu.com/ubuntu/ noble main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ noble-updates main restricted universe multiverse
#deb-src http://archive.ubuntu.com/ubuntu/ noble-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ noble-security main restricted universe multiverse
#deb-src http://archive.ubuntu.com/ubuntu/ noble-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ noble-backports main restricted universe multiverse
@emilyliu7321
emilyliu7321 / bluesky-comments.tsx
Created November 25, 2024 05:39
Integrate Bluesky replies as your blog's comment section
"use client";
/* eslint-disable @next/next/no-img-element */
import Link from "next/link";
import { useState, useEffect } from 'react';
import {
AppBskyFeedDefs,
AppBskyFeedPost,
type AppBskyFeedGetPostThread,
} from "@atproto/api";
@faustinoaq
faustinoaq / myAngular.html
Last active October 21, 2025 00:43
Front-end libraries (React, Vue, Angular) and the basic principles of how they work, all in a single file using pure JavaScript (VanillaJS).
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My Angular from Scratch</title>
<style>
.my-component {
font-family: Arial, sans-serif;
@adtac
adtac / README.md
Last active November 29, 2025 09:51
Using your Kindle as an e-ink monitor

3.5 fps, Paperwhite 3
@adtac_

step 1: jailbreak your Kindle

mobileread.com is your best resource here, follow the instructions from the LanguageBreak thread

I didn't really follow the LanguageBreak instructions because I didn't care about most of the features + I was curious to do it myself, but the LanguageBreak github repo was invaluable for debugging

@adtac
adtac / Dockerfile
Last active July 13, 2025 20:06
#!/usr/bin/env docker run
#!/usr/bin/env -S bash -c "docker run -p 8080:8080 -it --rm \$(docker build --progress plain -f \$0 . 2>&1 | tee /dev/stderr | grep -oP 'sha256:[0-9a-f]*')"
# syntax = docker/dockerfile:1.4.0
FROM node:20
WORKDIR /root
RUN npm install sqlite3

TL;DR

When Riot Games introduces the Vanguard anti-cheat to League of Legends, you should STOP playing and you must NOT install the anti-cheat when you get the pop-up. Vanguard is a kernel-level anticheat and these anticheats operate at a privilege level HIGHER THAN YOUR OWN. The anti-cheat can do things that even YOU can't do, without asking or letting you know. It's like Riot installing a camera in every room of your house and getting a copy of every key inside.

Here are just a few examples of what they can do: