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
$ snapserver --stream.port=1704 --stream.bind_to_address=0.0.0.0 --tcp.bind_to_address=0.0.0.0 --tcp.port=1705 \ | |
--stream.stream='tcp://127.0.0.1:4444?name=desktoptcp' | |
# Get ID: | |
$ pw-cli ls '*analog-stereo' | grep id | head | |
# id 68 | |
$ gst-launch-1.0 -v pipewiresrc path=68 ! audioresample ! \ | |
audio/x-raw,rate=48000,channels=2,format=S16LE ! wavenc ! \ | |
tcpclientsink host=127.0.0.1 port=4444 |
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
async function deleteAll() { | |
function firstItemTriggerDropdown() { | |
document.querySelector('ytmusic-responsive-list-item-renderer button path[d="M12,16.5c0.83,0,1.5,0.67,1.5,1.5s-0.67,1.5-1.5,1.5s-1.5-0.67-1.5-1.5S11.17,16.5,12,16.5z M10.5,12 c0,0.83,0.67,1.5,1.5,1.5s1.5-0.67,1.5-1.5s-0.67-1.5-1.5-1.5S10.5,11.17,10.5,12z M10.5,6c0,0.83,0.67,1.5,1.5,1.5 s1.5-0.67,1.5-1.5S12.83,4.5,12,4.5S10.5,5.17,10.5,6z"]') | |
.parentNode.parentNode.parentNode.parentNode.parentNode | |
.click() | |
} | |
function dropdownDelete() { | |
document.querySelector('tp-yt-iron-dropdown #contentWrapper a svg path[d="M11,17H9V8h2V17z M15,8h-2v9h2V8z M19,4v1h-1v16H6V5H5V4h4V3h6v1H19z M17,5H7v15h10V5z"]') | |
.parentNode.parentNode.parentNode.parentNode |
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 calculateFlexPoints() { | |
const p1 = points.find(p => p.id === segment.p1_id); | |
const p2 = points.find(p => p.id === segment.p2_id); | |
if (!p1 || !p2) return []; | |
const dx = p2.x - p1.x; | |
const dy = p2.y - p1.y; | |
const segment_length = Math.sqrt(dx * dx + dy * dy); | |
const flexPointsCoords = []; |
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
{ | |
systemd.timers.satisfactory-status = lib.mkIf botEnabled { | |
description = "Satisfactory status to Discord"; | |
wantedBy = [ "timers.target" ]; | |
requires = [ "network-online.target" ]; | |
timerConfig = { | |
OnCalendar = "minutely"; | |
Persistent = true; | |
}; | |
}; |
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 essentia | |
import essentia.standard as es | |
# Initialize the audio loader | |
loader = es.MonoLoader(filename='path_to_your_audio_file.mp3') | |
# Load the audio | |
audio = loader() | |
# Initialize the RhythmExtractor2013 |
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
use std::ops::Deref; | |
use sqlx::encode::IsNull; | |
use sqlx::error::BoxDynError; | |
use sqlx::postgres::{PgArgumentBuffer, PgTypeInfo, PgValueRef}; | |
use sqlx::{Decode, Encode, Postgres, Type}; | |
/// A vector. | |
#[derive(Clone, PartialEq, Default)] | |
pub struct Vector(Vec<f32>); |
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
ffmpeg -y -f lavfi -i color=c=black:s=128x128:r=25/1 \ | |
-f pulse -ac 2 -i pulse[or source name] \ | |
-fflags nobuffer -vcodec libx264 -r 24 -preset superfast -pix_fmt yuv420p -g 6 \ | |
-hls_list_size 3 -hls_time 1 -hls_flags delete_segments -strict -2 out.m3u8 |
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
height = 40; width = 80; depth = 80; | |
thickness = 2.7; cornerRadius = 10; tabLength = 10; | |
slotRepeatMin=2; slotLengthMin=20; slotLengthGap = 2; slotWidth = 0.2; | |
PI = 3.142*1.02; //Add a fudge factor for the bend radius | |
function hingeLength(angle, radius) = 2*PI*radius*(angle/360); | |
//Use true to generate 3D models of the box parts | |
//Use false to generate 2D models which can be exported |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension"> | |
<_name>Living Hinge</_name> | |
<id>org.lvl1.living_hinge</id> | |
<dependency type="executable" location="extensions">living_hinge.py</dependency> | |
<param name="unit" _gui-text="Unit" type="enum"> | |
<_item value="mm">mm</_item> | |
<_item value="cm">cm</_item> |
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
#! /usr/bin/env nix-shell | |
#! nix-shell -i python3 -p "python3.withPackages (p: [ p.numpy ])" | |
import json | |
import sys | |
import numpy as np | |
import collections | |
import binascii | |
data = json.load(open(sys.argv[1])) |
NewerOlder