Skip to content

Instantly share code, notes, and snippets.

@christianll9
christianll9 / permanent-YT-stream-pi.md
Last active May 12, 2024 00:26
How to stream permanently from a YouTube channel with a Raspberry Pi

Abstract

This tutorial explains, how you can program your Pi so that it automatically tries to connect to a specific YouTube live stream link at startup and always tries to reconnect if the connection is lost. My personal use case was for my grandpa to watch a live stream of his local church without the need to understand YouTube/internet. If you want a permanent stream of a specific channel, use the following link format: https://www.youtube.com/channel/<channel-id>/live (ID can be found with online tools like YouTube Channel ID Finder). This Gist should also work with other streaming services, if they are supported by Streamlink.

Tutorial

  1. Install a useful OS. This tutorial assumes the Raspberry Pi OS (32-bit).
  2. Setup an internet connection.
  3. Install the latest stable version of Streamlink. Older versions have problems with the more recent YouTube API. For the instal
@kyo-takano
kyo-takano / making-the-most-of-local-llms.ipynb
Last active May 12, 2024 00:25
ローカルLLMはこーやって使うの💢
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ChristopherA
ChristopherA / ssh-keys-best-practices.md
Last active May 12, 2024 00:24
SSH Keys - Best Practices

SSH Keys Best Practices

(VERY rought draft, still a work-in-progress)

SSH Key Seperation

Authentication and signing keys serve different purposes, especially on platforms like GitHub where code integrity and access control are crucial. Here's a comparison based on their functions and best practices:

Authentication Keys:

  1. Purpose:
@druska
druska / engine.c
Created September 17, 2018 15:18
Quant Cup 1's winning order book implementation
/*****************************************************************************
* QuantCup 1: Price-Time Matching Engine
*
* Submitted by: voyager
*
* Design Overview:
* In this implementation, the limit order book is represented using
* a flat linear array (pricePoints), indexed by the numeric price value.
* Each entry in this array corresponds to a specific price point and holds
* an instance of struct pricePoint. This data structure maintains a list
@crispyricepc
crispyricepc / install-instructions.md
Last active May 12, 2024 00:22
wlprop - An xprop clone for wlroots based compositors

Dependencies

Make sure you have installed the following commands:

  • swaymsg
  • jq
  • slurp
  • awk

Installation

@pwxcoo
pwxcoo / huffman.cpp
Created July 14, 2019 13:56
huffman encoding implemented by c++
#include <iostream>
#include <string>
#include <queue>
#include <unordered_map>
using namespace std;
// A Tree node
struct Node
{
char ch;
@tatsumoto-ren
tatsumoto-ren / subs.md
Last active May 12, 2024 00:00
Japanese Subtitles

📓 Table of Contents 📚 Resources ✉️ Chat


kitsunekko.net jp subtitles

A large repository of japanese subtitles that is updated reasonably often and has a clean design.| The most popular one, you can upload your own subs.| Often have to be retimed.

Node.js Deployment

Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt

1. Create Free AWS Account

Create free AWS Account at https://aws.amazon.com/

2. Create and Lauch an EC2 instance and SSH into machine

I would be creating a t2.medium ubuntu machine for this demo.

@xem
xem / readme.md
Last active May 11, 2024 23:57
Maths & trigonometry cheat sheet for 2D & 3D games

Conventions

  • A = [xA, yA] is a point on the 2D plane. Same for B, C, ...
  • lengths are in any unit (ex: pixels)
  • code snippets are in JavaScript

Degrees to radians

angleRad = angleDeg * Math.PI / 180;