This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//! This is a proof-of-concept for extracting vobsub subtitles from an MKV file. | |
//! It makes use of some private functions from the vobsub crate, and requires a | |
//! modified copy to export them. | |
//! | |
//! This is primarily created as a testing ground for integrating subtitle extraction | |
//! into mediacorral. The current version really only works for vobsub, and converts | |
//! the vobsub images into sixel images, printing them to the terminal. | |
use matroska_demuxer::*; | |
use std::{fs::File, time::Duration}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Example configuration for the m5stack ATOM Echo with support for speaking through an external speaker | |
substitutions: | |
name: m5stack-atom-echo-31ace0 | |
friendly_name: Shaun's Room Echo | |
speaker_entity: media_player.shaun_s_bedroom_lamp | |
wake_word: okay_nabu | |
api: | |
esphome: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Proof we live in the matrix: | |
If black holes are formed by compressing more and more matter into a | |
limited space until it gives in and sucks in everything around it, | |
then it stands to reason that this phenomenon is caused by an integer | |
overflow in the density property of that space. | |
Because integers within a computer occupy a finite space, they cannot |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[colors.bright] | |
black = "0x7f7f7f" | |
blue = "0x5c5cff" | |
cyan = "0x00ffff" | |
green = "0x00ff00" | |
magenta = "0xff00ff" | |
red = "0xff0000" | |
white = "0xffffff" | |
yellow = "0xffff00" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { | |
Readable, | |
} from "stream"; | |
export interface SpliceEntry { | |
size: number; | |
stream: Readable | Buffer; | |
} | |
export class StreamSplicer extends Readable { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import http from "http"; | |
import https from "https"; | |
import { | |
AddressInfo, | |
} from "net"; | |
import { URL } from "url"; | |
const updateServer = "https://updates.yourserver.com/path/to/update/dir/without/trailing/slash"; | |
const updateAuth = `Basic ${Buffer.from("username:password").toString("base64")}` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div | |
ref="muuriel" | |
class="muuri" | |
> | |
<div | |
class="muuri-item" | |
v-for="field in value" | |
:muurikey="field[muurikey]" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function downloadString(str, name) { | |
const elem = document.createElement("a"); | |
elem.href = URL.createObjectURL(new Blob([str])); | |
elem.download = name; | |
elem.click(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const rand = () => Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15); | |
type CSValue = CSLiteral | CSRef; | |
type CSLiteral = string | number | boolean | null; | |
type CSRef = [string]; | |
export function analyzeRefs(obj: any) { | |
const reference = new Map<object | any[], string>(); | |
// Build reference table |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div> | |
<v-text-field | |
v-model="syncVal" | |
> | |
<template slot="append"> | |
<v-tooltip top> | |
<template v-slot:activator="{ on }"> | |
<v-btn | |
v-on="on" |
NewerOlder