init: kompletní struktura /dnes, vyčištěná administrativa a mpd patch
This commit is contained in:
+1
-1
@@ -1 +1 @@
|
|||||||
clip-sanitizer.sh
|
/home/kof/.local/bin/clip-sanitizer.sh
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
cd repos/dnes.git
|
||||||
|
git init
|
||||||
|
|
||||||
|
cat << 'EOF' > ./02_observator/mpd_drift_gate.patch
|
||||||
|
diff --git a/main.go b/main.go
|
||||||
|
index a2f3b4c..c5d6e7f 100644
|
||||||
|
--- a/main.go
|
||||||
|
+++ b/main.go
|
||||||
|
@@ -12,3 +12,3 @@ const (
|
||||||
|
- DriftGate = 500 * time.Millisecond
|
||||||
|
+ DriftGate = 300 * time.Millisecond
|
||||||
|
MpdPort = "6600"
|
||||||
|
)
|
||||||
|
EOF
|
||||||
|
|
||||||
|
git add .
|
||||||
|
git commit -m "init: kompletní struktura /dnes, vyčištěná administrativa a mpd patch"
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/zsh
|
||||||
|
|
||||||
|
# mpc clear
|
||||||
|
|
||||||
|
# This searches the database for all files where the file path starts with "Music/"
|
||||||
|
# It is faster and handles the recursion automatically
|
||||||
|
song=$(mpc ls | fzf --multi --prompt="Music > ")
|
||||||
|
|
||||||
|
if [ -n "$song" ]; then
|
||||||
|
echo "$song" | mpc add
|
||||||
|
mpc play
|
||||||
|
fi
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
SKETCH=`pwd`
|
SKETCH=`pwd`
|
||||||
OUTPUT=/tmp/processingMess/
|
OUTPUT=/tmp/processingMess/
|
||||||
|
|
||||||
killall processing-java || echo No instances running, good.
|
killall processing || echo No instances running, good.
|
||||||
cd "/home/kof/processing-git/build/linux/work" && ./processing-java --sketch="$SKETCH" --output=$OUTPUT --force --run
|
cd "/var/lib/snapd/snap/bin/" && ./processing cli --sketch="$SKETCH" --output=$OUTPUT --force --run
|
||||||
cd $SKETCH
|
cd $SKETCH
|
||||||
|
|
||||||
|
|||||||
Executable
+30
@@ -0,0 +1,30 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Define your audio devices
|
||||||
|
SYNTH_SRC="your_system_output.monitor"
|
||||||
|
MIC_SRC="your_microphone_input"
|
||||||
|
|
||||||
|
SESSION_NAME="live_session_$(date +%Y%m%d_%H%M%S)"
|
||||||
|
|
||||||
|
echo "--> Initializing synced audio + terminal recording..."
|
||||||
|
|
||||||
|
# 1. Start FFmpeg in the background silently
|
||||||
|
ffmpeg -y -f pulse -i "$SYNTH_SRC" -f pulse -i "$MIC_SRC" \
|
||||||
|
-filter_complex "[0:a]volume=1.0[synth]; [1:a]volume=0.4[mic]; [synth][mic]amix=inputs=2:duration=longest[out]" \
|
||||||
|
-map "[out]" -acodec libmp3lame -b:a 192k "${SESSION_NAME}.mp3" > /dev/null 2>&1 &
|
||||||
|
FFMPEG_PID=$!
|
||||||
|
|
||||||
|
# 2. Immediately launch asciinema in the foreground
|
||||||
|
# This keeps you in the active terminal environment
|
||||||
|
asciinema rec "${SESSION_NAME}.cast"
|
||||||
|
|
||||||
|
# 3. Once you exit the asciinema session, the script resumes here:
|
||||||
|
echo "--> Terminal session ended. Wrapping up audio..."
|
||||||
|
|
||||||
|
# Send a polite SIGTERM to FFmpeg so it flushes the MP3 buffer safely
|
||||||
|
kill -15 $FFMPEG_PID
|
||||||
|
wait $FFMPEG_PID
|
||||||
|
|
||||||
|
echo "--> Done! Saved files:"
|
||||||
|
echo " ${SESSION_NAME}.cast (Terminal)"
|
||||||
|
echo " ${SESSION_NAME}.mp3 (Audio Mix)"
|
||||||
+1
-1
@@ -22,7 +22,7 @@ tmp_img="/tmp/renderedText.png"
|
|||||||
|
|
||||||
# 2. Samotný rendering (Sjednoceno na šířku 500px)
|
# 2. Samotný rendering (Sjednoceno na šířku 500px)
|
||||||
convert \
|
convert \
|
||||||
-size 500x \
|
-size 512x \
|
||||||
-background black \
|
-background black \
|
||||||
-fill '#E18A07' -font '/home/kof/.fonts/TeutonWeiss.ttf' -pointsize 58 -gravity center caption:"Crypto by Kof" \
|
-fill '#E18A07' -font '/home/kof/.fonts/TeutonWeiss.ttf' -pointsize 58 -gravity center caption:"Crypto by Kof" \
|
||||||
-fill '#404040' -font '/home/kof/.fonts/TeutonNormal.otf' -pointsize 12 -gravity center caption:"message generated @ $(hostname) on $(date)" \
|
-fill '#404040' -font '/home/kof/.fonts/TeutonNormal.otf' -pointsize 12 -gravity center caption:"message generated @ $(hostname) on $(date)" \
|
||||||
|
|||||||
Executable
+58
@@ -0,0 +1,58 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
import os
|
||||||
|
from google.auth.transport.requests import Request
|
||||||
|
from google.oauth2.credentials import Credentials
|
||||||
|
from google_auth_oauthlib.flow import InstalledAppFlow
|
||||||
|
from google.api_core.retry import Retry
|
||||||
|
from googleapiclient.discovery import build
|
||||||
|
from googleapiclient.http import MediaFileUpload
|
||||||
|
|
||||||
|
SCOPES = ["https://www.googleapis.com/auth/youtube.upload"]
|
||||||
|
|
||||||
|
def authenticate():
|
||||||
|
creds = None
|
||||||
|
if os.path.exists("token.json"):
|
||||||
|
creds = Credentials.from_authorized_user_file("token.json", SCOPES)
|
||||||
|
|
||||||
|
if not creds or not creds.valid:
|
||||||
|
if creds and creds.expired and creds.refresh_token:
|
||||||
|
creds.refresh(Request())
|
||||||
|
else:
|
||||||
|
flow = InstalledAppFlow.from_client_secrets_file("client_secret.json", SCOPES)
|
||||||
|
creds = flow.run_local_server(port=0)
|
||||||
|
|
||||||
|
with open("token.json", "w") as token:
|
||||||
|
token.write(creds.to_json())
|
||||||
|
|
||||||
|
return creds
|
||||||
|
|
||||||
|
def upload_video(file_path, title, description, category="22", privacy="private"):
|
||||||
|
creds = authenticate()
|
||||||
|
youtube = build("youtube", "v3", credentials=creds)
|
||||||
|
|
||||||
|
body = {
|
||||||
|
"snippet": {
|
||||||
|
"title": title,
|
||||||
|
"description": description,
|
||||||
|
"tags": ["test"],
|
||||||
|
"categoryId": category
|
||||||
|
},
|
||||||
|
"status": {
|
||||||
|
"privacyStatus": privacy
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
media = MediaFileUpload(file_path, mimetype="video/mp4", resumable=True)
|
||||||
|
request = youtube.videos().insert(part="snippet,status", body=body, media_body=media)
|
||||||
|
|
||||||
|
response = None
|
||||||
|
while response is None:
|
||||||
|
status, response = request.next_chunk()
|
||||||
|
if status:
|
||||||
|
print(f"Upload progress: {int(status.progress() * 100)}%")
|
||||||
|
|
||||||
|
print(f"Video uploaded! Video ID: {response['id']}")
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
upload_video("your_video.mp4", "My Video Title", "My description", privacy="public")
|
||||||
|
|
||||||
Submodule
+1
Submodule wifite-mod-pixiewps added at cb8a19e3e1
Reference in New Issue
Block a user