Skip to content

Instantly share code, notes, and snippets.

@savegame
savegame / pulse_sreaming.md
Last active May 23, 2024 04:57
PulseAudio / PipeWire streaming audio from Client to remote PulseAudio / PipeWire Server

We have Server machine, this computer with Headphones, and we have Client computer, this is remote PC with music =) On Server we should first open port for listening connections from Client :

# on ubuntu 
sudo ufw allow from <Client_IP> to any port 4656 proto tcp
# on fedora ( with firewalld ) 
sudo firewall-ctl --add-port 4656/tcp

note: port 4656 just for sample. you can use any port you want
than on Server, from current user add listening for connections

@junkblocker
junkblocker / wordle.md
Created February 3, 2022 02:51 — forked from huytd/wordle.md
Wordle in less than 50 lines of Bash

image

How to use:

./wordle.sh

Or try the unlimit mode:

@junkblocker
junkblocker / obsidian-web-clipper.js
Created January 12, 2022 01:01 — forked from kepano/obsidian-web-clipper.js
Obsidian Web Clipper Bookmarklet to save articles and pages from the web (for Safari, Chrome, Firefox, and mobile browsers)
javascript: Promise.all([import('https://unpkg.com/turndown@6.0.0?module'), import('https://unpkg.com/@tehshrike/readability@0.2.0'), ]).then(async ([{
default: Turndown
}, {
default: Readability
}]) => {
/* Optional vault name */
const vault = "";
/* Optional folder name such as "Clippings/" */
{
"context.exec": [],
"context.modules": [
{
"args": {},
"flags": [
"ifexists",
"nofail"
],
"name": "libpipewire-module-rtkit"
@shdbwa
shdbwa / default.pa
Last active October 20, 2020 05:28
Split one 5.1 audio card with one 5.1 output in 3 virtual sound cards with stereo output mapped to : (front_left+front_right) AND (rear_left+rear_right) AND (center+LFE))
#!/usr/bin/pulseaudio -nF
#$HOME/.pulse/default.pa
# This file is part of PulseAudio.
#
# PulseAudio is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# PulseAudio is distributed in the hope that it will be useful, but
@lucidbeaming
lucidbeaming / minterpolate.sh
Created December 31, 2019 08:52
Generate examples of various motion compensated interpolation settings for ffmpeg
#!/bin/bash
if [ -z "$1" ]
then
echo "No file input"
else
ffmpeg -ss 5 -i "$1" -vf "minterpolate='fps=90',setpts=N/(29.97*TB)" -r 29.97 -t 15 -an -c:v libx264 -crf 21 -pix_fmt yuv420p -preset fast "default-${1%.*}.mp4"
ffmpeg -ss 5 -i "$1" -vf "minterpolate='fps=90':mi_mode=mci:mc_mode=aobmc,setpts=N/(29.97*TB)" -r 29.97 -t 15 -an -c:v libx264 -crf 21 -pix_fmt yuv420p -preset fast "aombc-${1%.*}.mp4"
ffmpeg -ss 5 -i "$1" -vf "minterpolate='fps=90':mi_mode=mci:me_mode=bidir,setpts=N/(29.97*TB)" -r 29.97 -t 15 -an -c:v libx264 -crf 21 -pix_fmt yuv420p -preset fast "bidir-${1%.*}.mp4"
ffmpeg -ss 5 -i "$1" -vf "minterpolate='fps=90':mi_mode=mci:me=esa,setpts=N/(29.97*TB)" -r 29.97 -t 15 -an -c:v libx264 -crf 21 -pix_fmt yuv420p -preset fast "esa-${1%.*}.mp4"
@blurayne
blurayne / ui-widget-select.sh
Last active March 15, 2024 20:27
Pure BASH interactive CLI/TUI menu (single and multi-select/checkboxes)
#!/bin/bash
##
# Pure BASH interactive CLI/TUI menu (single and multi-select/checkboxes)
#
# Author: Markus Geiger <mg@evolution515.net>
# Last revised 2019-09-11
#
# ATTENTION! TO BE REFACTORED! FIRST DRAFT!
#
@shakalaca
shakalaca / gist:bbc439916f389a7275083f90539059de
Created August 19, 2019 14:41
Fastboot commands for ROG Phone II
@======== Fastboot command ========
@Get info :
@>>> fastboot oem gpt-info
@>>> fastboot oem isn-info
@>>> fastboot oem ssn-info
@>>> fastboot oem system-info
@>>> fastboot oem device-info
@Get ID :
@>>> fastboot oem get-prjid
@>>> fastboot oem get-hwid
#!/usr/bin/python3
"""
Usage:
plasmasetconfig # List all widget namespaces
plasmasetconfig org.kde.plasma.digitalclock # List all config groups+keys
plasmasetconfig org.kde.plasma.digitalclock Appearance showSeconds true
Install:
chmod +x ~/Downloads/plasmasetconfig.py
sudo cp ~/Downloads/plasmasetconfig.py /usr/local/bin/plasmasetconfig
Uninstall:
@QGB
QGB / QShell.sh
Created December 19, 2018 02:55
shell@HS8917QC:/ $ [ "$pyPath" != "" ] || echo 233
233
shell@HS8917QC:/ $
shell@HS8917QC:/ $ env|grep qs
qscript=//qshell
qsPath=//
shell@HS8917QC:/ $ unset qsPath
shell@HS8917QC:/ $ [ "$pyPath" != "" ] || echo 233 #不能检测 环境变量
233
shell@HS8917QC:/ $ env|grep qs