Skip to content

Instantly share code, notes, and snippets.

@lvluu
lvluu / gist:0c541837b1fcd6ac122054ba25c8e3a3
Created January 1, 2025 06:43
setup Rust dev env on windows with scoop
```
scoop install rustup-gnu
rustup toolchain install stable-x86_64-pc-windows-gnu
rustup default stable-x86_64-pc-windows-gnu
```
@lvluu
lvluu / jellyfin-samsung.md
Last active December 29, 2024 05:03 — forked from SayantanRC/jellyfin-samsung.md
Sign Jellyfin for Samsung TVs

Prerequisite

  • This guide is based on using an Ubuntu 22.04 VM with VirtualBox

    • you may have to note
    • use bridge adapter to get pingable IP between TV & VM
  • Know IP address of VM & TV

  • Enable Developer mode on Samsung TV with VM address

Steps

  1. Get ubuntu 22.04 LTS. Create a VM if needed with >50GB vm drive
var mediaJSON = { "categories" : [ { "name" : "Movies",
"videos" : [
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ],
"subtitle" : "By Blender Foundation",
"thumb" : "images/BigBuckBunny.jpg",
"title" : "Big Buck Bunny"
},
{ "description" : "The first Blender Open Movie from 2006",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ],
@lvluu
lvluu / docker-compose.yaml
Created November 12, 2024 09:11
Traefik docker-compose setup with Windows rancher desktop 🛫
services:
exposedockerdaemon:
image: alpine/socat:latest
container_name: exposedockerdaemon
volumes:
- '/var/run/docker.sock:/var/run/docker.sock'
restart: always
command: tcp-listen:2375,fork,reuseaddr unix-connect:/var/run/docker.sock
traefik:
@lvluu
lvluu / g.txt
Last active March 31, 2023 03:46
Git ignore files locally
# Locally ignore changed file(s)
git update-index --skip-worktree [PATH]
# Bring it back
git update-index --no-skip-worktree [PATH]
@lvluu
lvluu / json.date.parse.js
Last active March 31, 2023 03:37
JSON.parse() with nested Date type properties
const moment = require("moment");
const dummy = { d: { d1: new Date() } };
function isDateString(value) {
return (
typeof value === "string" &&
moment(value, moment.ISO_8601, true).isValid() &&
value.length >= 6
);