diff --git a/README.md b/README.md new file mode 100644 index 0000000..cdeb1db --- /dev/null +++ b/README.md @@ -0,0 +1,77 @@ +# bin Scripts Collection + +Personal scripts, tools and helpers in `~/bin`. 381 files, 290 shebang scripts, 48 dedicated shell scripts (below). + +## Shell Scripts (48) + +| Script | Description | +|--------|-------------| +| `antisocial_scan.sh` | Wi network scanning for ESSID and MAC addresses | +| `antisocial.sh` | Wireless network deauthing/deauth tool | +| `archer_router_wifi_fix_20260923-050642.sh` | Diagnose a "stuck" TP-Link/Archer router: per-interface ping + admin page checks, `wifi` mode for post-reboot Wi-Fi-only verification | +| `banSuckers.sh` | Blocks SSH failed attackers by IP | +| `bbc_ws.sh` | Plays BBC World Service radio stream | +| `bluesound.sh` | PulseAudio loopback for Bluesound speaker | +| `clip-sanitizer.sh` | Sanitizes clipboard contents on change (`clipnotify` loop) | +| `compilerArm.sh` | Links ARM gcc compiler tools | +| `compilerX64.sh` | Removes ARM links for x86 compiler | +| `drop_caches.sh` | Drops system file caches | +| `fantune.sh` | PWM fan control testing and data logging | +| `getTime.sh` | Gets file modification time | +| `git-diff.sh` | Simple git diff using meld | +| `git-meld.sh` | Git repository diff comparison tool | +| `Google.sh` | Google search via elinks browser | +| `h264Parallel.sh` | H264 parallel encoding into segments | +| `icecastFileWebm.sh` | File to WebM streaming via GStreamer | +| `icecast.sh` | Video4linux2 to Icecast Theora/Ogg streaming | +| `icecastWebmIIM.sh` | Video4linux2 to WebM with ICEcast+Jack audio | +| `icecastWebmIIMtest.sh` | Test version with video testsrc | +| `icecastWebm.sh` | Video4linux2 to WebM streaming | +| `icecastWebmX11giss.sh` | X11 screen capture to WebM with GISS | +| `icecastWebmX11IIM.sh` | X11 screen capture to WebM with IIM | +| `icecastWebmX11.sh` | X11 screen capture to WebM | +| `icecastXX.sh` | Xvfb + YouTube effect + WebM streaming | +| `icelocal.sh` | Local video melting and ICE streaming | +| `icemeltFast.sh` | Fast video melting to WebM format | +| `icescreenmelt.sh` | Screen recording melt to WebM | +| `iimTestStream.sh` | Test ICE stream generation | +| `jackgoto.sh` | Jack transport time to seconds conversion | +| `lanDiscover.sh` | LAN discovery using pinger | +| `mailsync.sh` | OfflineIMAP process monitor/killer | +| `manhattanPulse.sh` | Audio streaming to Icecast server | +| `plus.sh` | Cesnet PLUS radio stream player | +| `postFacebook.sh` | Facebook Page photo/text poster (Graph API) | +| `postMastodon.sh` | Mastodon status poster with media | +| `publish.sh` | Publish an image: postgen + Mastodon + Facebook + Ko-fi | +| `radioKlobouk.sh` | Radio streaming to Icecast server | +| `reportIP.sh` | AbuseIPDB IP reputation report | +| `scan.sh` | Wi AP scanner outputting CSV format | +| `screencap.sh` | X11 window capture ffmpeg command generator | +| `screencast.sh` | Screen+Jack audio screencast to MKV | +| `shout.sh` | FIFO-based broadcasting loop | +| `stream.sh` | Icecast MP3 streaming loop | +| `tctosec.sh` | Timecode (HH:MM:SS:FR) to seconds conversion | +| `turbovnc-with-sound.sh` | VNC with sound over SSH tunnel | +| `upyt.sh` | YouTube upload with media info | +| `video_collage.sh` | Video clip collage creator from directory | + +## Facebook publishing (postFacebook.sh) + +Posts to a Facebook **Page** via the Graph API (personal profiles are not supported by the API). + +### One-time token setup (~15 min) +1. `developers.facebook.com` → **Create app** (type: Business) → add **Facebook Login for Business** product. +2. **Graph API Explorer** (in the app) → get a short-lived *user* token with scopes: + `pages_show_list`, `pages_manage_posts`, `pages_read_engagement`, `public_profile`. +3. Exchange for a long-lived user token (~60 days): + `GET https://graph.facebook.com/v25.0/oauth/access_token?grant_type=fb_exchange_token&client_id={APP_ID}&client_secret={APP_SECRET}&fb_exchange_token={short_token}` +4. Get the Page token + Page ID (long-lived page tokens do not expire unless revoked): + `GET https://graph.facebook.com/v25.0/me/accounts?access_token={long_lived_user_token}` + → copy the `id` and `access_token` of your Page. +5. Store them: + - `echo -n '' > ~/.facebook-token` + - `echo -n '' > ~/.facebook-page-id` + (or export `FACEBOOK_TOKEN` / `FACEBOOK_PAGE_ID`). + +### Usage +`postFacebook.sh 'caption text' image.png` \ No newline at end of file diff --git a/banSuckers.sh b/banSuckers.sh new file mode 100755 index 0000000..202b549 --- /dev/null +++ b/banSuckers.sh @@ -0,0 +1,4 @@ +#!/bin/bash +FILENAME=attackers_`date +%Y%m%d`.txt +journalctl -u sshd --since today --no-pager | grep "Failed password" | grep -oE '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | sort | uniq -c | sort -nr | head -n 20 | awk '{print $2}' > ~/$FILENAME +for i in `cat ~/$FILENAME`; do drop $i ; done diff --git a/bbc_ws.sh b/bbc_ws.sh new file mode 100755 index 0000000..632291d --- /dev/null +++ b/bbc_ws.sh @@ -0,0 +1 @@ +mpv http://stream.live.vc.bbcmedia.co.uk/bbc_world_service diff --git a/blender b/blender deleted file mode 100755 index d5982c0..0000000 --- a/blender +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -cd /opt/blender #blender-2.65a-linux-glibc211-x86_64 -primusrun ./blender diff --git a/drop_caches.sh b/drop_caches.sh new file mode 100755 index 0000000..e0e9b21 --- /dev/null +++ b/drop_caches.sh @@ -0,0 +1,2 @@ +#!/bin/bash +sync && echo 3 | sudo tee /proc/sys/vm/drop_caches diff --git a/manhattanPulse.sh b/manhattanPulse.sh new file mode 100755 index 0000000..9456533 --- /dev/null +++ b/manhattanPulse.sh @@ -0,0 +1,25 @@ +#!/bin/bash +ffmpeg -f pulse -i default.monitor -c:a libmp3lame -b:a 192k -f mp3 pipe:1 | python3 -c ' +import socket, sys +s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) +s.connect(("192.168.1.101", 9000)) +s.sendall(b"SOURCE /radio.mp3 HTTP/1.0\r\nAuthorization: Basic c291cmNlOmNpZ2FyZXRh\r\nContent-Type: audio/mpeg\r\n\r\n") + +s.settimeout(2.0) +try: + resp = s.recv(1024) + print("Icecast:", resp.decode(errors="ignore"), file=sys.stderr) +except Exception: + pass +s.settimeout(None) + +while True: + data = sys.stdin.buffer.read(4096) + if not data: + break + try: + s.sendall(data) + except socket.error: + break +s.close() +' diff --git a/now b/now index 631cb8c..75915d6 100755 --- a/now +++ b/now @@ -1,13 +1,27 @@ #!/bin/bash -ARGS="$*" -date +%s.%N -echo `date +%s.%N` "$ARGS" >> /home/kof/src/now/log +# Check if the first argument starts with [ and ends with ] +if [[ "$1" =~ ^\[.*\]$ ]]; then + CATEGORY="${1^^}" # Uppercase the tag + shift # Remove the category from the argument list + ARGS="$*" # The rest of the message +else + CATEGORY="GENERAL" + ARGS="$*" +fi + +# Generate timestamp +TS=$(date +%s.%N) + +# Log to file +echo "$TS [$CATEGORY] $ARGS" >> /home/kof/src/now/log + +# Print to stdout +echo "$TS" + +# Git operations cd /home/kof/src/now -git commit -am "`date +%s.%N`" +git commit -am "$TS [$CATEGORY] $ARGS" git pull git push -#rsync -avzu home:Downloads ~/. -#cd ~/Downloads -#cp `ls -tr | tail -n 1` "$*"; mv "$*" ~/Pictures; cd ~/Pictures && postgen "$*" diff --git a/pdecc b/pdecc new file mode 120000 index 0000000..2509a61 --- /dev/null +++ b/pdecc @@ -0,0 +1 @@ +/home/kof/src/RaylibProcessing/pdecc \ No newline at end of file diff --git a/pdeide b/pdeide new file mode 120000 index 0000000..e0f0cfb --- /dev/null +++ b/pdeide @@ -0,0 +1 @@ +/home/kof/src/RaylibProcessing/pdeide \ No newline at end of file diff --git a/plus.sh b/plus.sh new file mode 100755 index 0000000..fea1ff5 --- /dev/null +++ b/plus.sh @@ -0,0 +1,2 @@ +#!/bin/bash +mpv http://amp.cesnet.cz:8000/cro-plus-256.ogg diff --git a/postFacebook.sh b/postFacebook.sh new file mode 100755 index 0000000..2f55723 --- /dev/null +++ b/postFacebook.sh @@ -0,0 +1,62 @@ +#!/usr/bin/env bash +set -euo pipefail + +API="https://graph.facebook.com/v25.0" +TOKEN="${FACEBOOK_TOKEN:-}" +if [ -z "$TOKEN" ] && [ -f "$HOME/.facebook-token" ]; then + TOKEN="$(tr -d '\n' < "$HOME/.facebook-token")" +fi +if [ -z "$TOKEN" ]; then + echo "ERROR: no token. Set FACEBOOK_TOKEN or create ~/.facebook-token (long-lived Page access token)" >&2 + exit 1 +fi + +PAGE_ID="${FACEBOOK_PAGE_ID:-}" +if [ -z "$PAGE_ID" ] && [ -f "$HOME/.facebook-page-id" ]; then + PAGE_ID="$(tr -d '\n' < "$HOME/.facebook-page-id")" +fi +if [ -z "$PAGE_ID" ]; then + echo "ERROR: no page id. Set FACEBOOK_PAGE_ID or create ~/.facebook-page-id" >&2 + exit 1 +fi + +if [ "$#" -lt 1 ] || [ "$#" -gt 2 ]; then + echo "Usage: $0 'post caption' [image-file]" >&2 + exit 1 +fi +CAPTION="$1" +IMAGE="${2:-}" + +json_field() { + python3 -c "import json,sys; d=json.load(sys.stdin); print(d.get('$1','') or '')" +} + +if [ -n "$IMAGE" ]; then + if [ ! -f "$IMAGE" ]; then + echo "ERROR: image not found: $IMAGE" >&2 + exit 1 + fi + echo "--> Publishing photo to page $PAGE_ID..." + RESP="$(curl -sS -X POST "$API/$PAGE_ID/photos" \ + -H "Authorization: Bearer $TOKEN" \ + -F "source=@$IMAGE" \ + --form-string "caption=$CAPTION")" + ID="$(echo "$RESP" | json_field id)" + if [ -z "$ID" ]; then + echo "ERROR: photo post failed: $RESP" >&2 + exit 1 + fi + echo "--> Posted photo, id: $ID" + echo " https://www.facebook.com/photo.php?fbid=$ID" +else + echo "--> Publishing text post to page $PAGE_ID..." + RESP="$(curl -sS -X POST "$API/$PAGE_ID/feed" \ + -H "Authorization: Bearer $TOKEN" \ + --data-urlencode "message=$CAPTION")" + ID="$(echo "$RESP" | json_field id)" + if [ -z "$ID" ]; then + echo "ERROR: post failed: $RESP" >&2 + exit 1 + fi + echo "--> Posted, id: $ID" +fi diff --git a/postMastodon.sh b/postMastodon.sh new file mode 100755 index 0000000..c5eb8ea --- /dev/null +++ b/postMastodon.sh @@ -0,0 +1,108 @@ +#!/usr/bin/env bash +set -euo pipefail + +INSTANCE="https://mamot.fr" +TOKEN="${MAMOT_TOKEN:-}" +if [ -z "$TOKEN" ] && [ -f "$HOME/.mamot-token" ]; then + TOKEN="$(tr -d '\n' < "$HOME/.mamot-token")" +fi +if [ -z "$TOKEN" ]; then + echo "ERROR: no token. Set MAMOT_TOKEN or create ~/.mamot-token" >&2 + exit 1 +fi + +usage() { + echo "Usage: $0 [--edit STATUS_ID] 'post text' [audio-file]" >&2 + exit 1 +} + +MODE="post" +if [ "${1:-}" = "--edit" ]; then + MODE="edit" + shift + if [ "$#" -lt 2 ]; then + usage + fi + STATUS_ID="$1" + shift +fi + +if [ "$#" -lt 1 ] || [ "$#" -gt 2 ]; then + usage +fi +TEXT="$1" +MEDIA="${2:-}" + +json_field() { + python3 -c "import json,sys; d=json.load(sys.stdin); print(d.get('$1','') or '')" +} + +if [ "$MODE" = "edit" ]; then + echo "--> Editing status $STATUS_ID..." + RESP="$(curl -sS -X PUT "$INSTANCE/api/v1/statuses/$STATUS_ID" \ + -H "Authorization: Bearer $TOKEN" \ + --data-urlencode "status=$TEXT")" + URL="$(echo "$RESP" | json_field url)" + if [ -z "$URL" ]; then + echo "ERROR: edit failed: $RESP" >&2 + exit 1 + fi + echo "--> Edited: $URL" + exit 0 +fi + +MEDIA_IDS=() +if [ -n "$MEDIA" ]; then + echo "--> Uploading media: $MEDIA" + RESP="$(curl -sS -f -X POST "$INSTANCE/api/v2/media" \ + -H "Authorization: Bearer $TOKEN" \ + -F "file=@$MEDIA" \ + -F "description=Asciisync session audio (terminal + synth/mic mix)")" + MEDIA_ID="$(echo "$RESP" | json_field id)" + if [ -z "$MEDIA_ID" ]; then + echo "ERROR: media upload failed: $RESP" >&2 + exit 1 + fi + MEDIA_IDS+=("$MEDIA_ID") + echo "--> Media uploaded, id: $MEDIA_ID" + + echo "--> Waiting for media processing..." + for i in $(seq 1 20); do + STATUS="$(curl -sS -H "Authorization: Bearer $TOKEN" "$INSTANCE/api/v1/media/$MEDIA_ID")" + if echo "$STATUS" | grep -q '"original"'; then + echo "--> Media ready." + break + fi + sleep 2 + done +fi + +echo "--> Posting status..." +ARGS=(-sS -X POST "$INSTANCE/api/v1/statuses" \ + -H "Authorization: Bearer $TOKEN" \ + --data-urlencode "status=$TEXT" \ + --data-urlencode "visibility=public" \ + --data-urlencode "language=en") +for id in "${MEDIA_IDS[@]}"; do + ARGS+=("--data-urlencode" "media_ids[]=$id") +done + +RESP="" +for i in $(seq 1 10); do + RESP="$(curl "${ARGS[@]}")" + if echo "$RESP" | grep -q '"error"'; then + if echo "$RESP" | grep -q 'not finished processing'; then + echo "--> Media still processing, retry $i..." + sleep 3 + continue + fi + break + fi + break +done +URL="$(echo "$RESP" | json_field url)" +if [ -z "$URL" ]; then + echo "ERROR: post failed: $RESP" >&2 + exit 1 +fi +echo "--> Posted: $URL" diff --git a/pprun b/pprun new file mode 120000 index 0000000..e5224d5 --- /dev/null +++ b/pprun @@ -0,0 +1 @@ +run \ No newline at end of file diff --git a/publish.sh b/publish.sh new file mode 100755 index 0000000..32c5987 --- /dev/null +++ b/publish.sh @@ -0,0 +1,116 @@ +#!/usr/bin/env bash +set -euo pipefail + +KOFI_PAGE="kof86" + +usage() { + echo "Usage: $0 [--no-postgen] [--no-mastodon] [--no-facebook] [--no-kofi] " >&2 + exit 1 +} + +DO_POSTGEN=1 +DO_MASTODON=1 +DO_FACEBOOK=1 +DO_KOFI=1 + +while [ "${1:-}" = "--no-postgen" ] || [ "${1:-}" = "--no-mastodon" ] || [ "${1:-}" = "--no-facebook" ] || [ "${1:-}" = "--no-kofi" ]; do + case "$1" in + --no-postgen) DO_POSTGEN=0 ;; + --no-mastodon) DO_MASTODON=0 ;; + --no-facebook) DO_FACEBOOK=0 ;; + --no-kofi) DO_KOFI=0 ;; + esac + shift +done + +if [ "$#" -ne 1 ]; then + usage +fi +IMAGE="$1" + +if [ ! -f "$IMAGE" ]; then + echo "ERROR: image not found: $IMAGE" >&2 + exit 1 +fi + +if [ -z "${EDITOR:-}" ]; then + EDITOR="vim" +fi + +echo "--> Draft message in $EDITOR..." +DRAFT="$(mktemp /tmp/publish-msg-XXXXXX)" +trap 'rm -f "$DRAFT"' EXIT +$EDITOR "$DRAFT" + +MSG="$(cat "$DRAFT")" +if [ -z "${MSG//[$'\t\r\n']/}" ]; then + echo "ERROR: message is empty" >&2 + exit 1 +fi + +printf '%s' "Add code link? (y/N) " +read -r ADD_CODE +case "$ADD_CODE" in + y|Y|yes|YES) + printf '%s' "Code URL: " + read -r CODE_URL + if [ -n "$CODE_URL" ]; then + MSG="$MSG + +Code: $CODE_URL" + fi + ;; +esac + +if [ "$DO_POSTGEN" -eq 1 ]; then + echo "--> [1/4] postgen..." + postgen "$IMAGE" +fi + +if [ "$DO_MASTODON" -eq 1 ]; then + if [ -f "$HOME/.mamot-token" ]; then + echo "--> [2/4] Mastodon..." + postMastodon.sh "$MSG" "$IMAGE" + else + echo "WARNING: ~/.mamot-token missing, skipping Mastodon" >&2 + fi +fi + +if [ "$DO_FACEBOOK" -eq 1 ]; then + printf '%s' "Publish to Facebook? (y/N) " + read -r DO_FB + case "$DO_FB" in + y|Y|yes|YES) ;; + *) DO_FACEBOOK=0 ;; + esac +fi + +if [ "$DO_FACEBOOK" -eq 1 ]; then + if [ -f "$HOME/.facebook-token" ] && [ -f "$HOME/.facebook-page-id" ]; then + echo "--> [3/4] Facebook..." + postFacebook.sh "$MSG" "$IMAGE" + else + echo "--> [3/4] Facebook..." + echo " Graph API posts to Pages only (no personal-profile posting); opening browser for manual post." + xdg-open "https://www.facebook.com/" >/dev/null 2>&1 || true + echo " In the browser: create a new post and upload $IMAGE" + fi +fi + +if [ "$DO_KOFI" -eq 1 ]; then + printf '%s' "Publish to Ko-fi? (y/N) " + read -r DO_KF + case "$DO_KF" in + y|Y|yes|YES) ;; + *) DO_KOFI=0 ;; + esac +fi + +if [ "$DO_KOFI" -eq 1 ]; then + echo "--> [4/4] Ko-fi..." + echo " Ko-fi has no post API; opening browser for manual post." + xdg-open "https://ko-fi.com/$KOFI_PAGE" >/dev/null 2>&1 || true + echo " In the browser: Create -> Post Something -> Image, upload $IMAGE" +fi + +echo "--> publish.sh done." diff --git a/radioKlobouk.sh b/radioKlobouk.sh new file mode 100755 index 0000000..5ea9a1a --- /dev/null +++ b/radioKlobouk.sh @@ -0,0 +1,2 @@ +#!/bin/bash +ffmpeg -f pulse -i "alsa_output.pci-0000_00_1b.0.analog-stereo.monitor" -acodec libmp3lame -b:a 128k -content_type audio/mpeg -f mp3 icecast://source:cigareta@192.168.1.101:9000/radio.mp3 diff --git a/reportIP.sh b/reportIP.sh new file mode 100755 index 0000000..8a398fd --- /dev/null +++ b/reportIP.sh @@ -0,0 +1,40 @@ +#!/bin/bash + +# Vlož svůj AbuseIPDB API klíč +API_KEY="a1d2002d5eb3f87f3b703580abeee4015ea8bf075ec436886f187fc8d7c04510104992d6ebae28b0" + +# Kontrola, zda byla zadána IP adresa +if [ -z "$1" ]; then + echo "Použití: $0 " + exit 1 +fi + +IP="$1" + +echo "Ověřuji IP adresu: $IP přes AbuseIPDB..." + +# Volání AbuseIPDB API pomocí curl a zpracování přes jq +response=$(curl -s -G 'https://api.abuseipdb.com/api/v2/check' \ + --data-urlencode "ipAddress=$IP" \ + -d maxAgeInDays=90 \ + -H "Key: $API_KEY" \ + -H "Accept: application/json") + +# Kontrola, zda odpověď obsahuje data +if echo "$response" | grep -q "errors"; then + echo "Chyba při komunikaci s API:" + echo "$response" | jq '.errors' + exit 1 +fi + +# Parsování a výsledek pomocí jq +echo "----------------------------------------" +echo "IP adresa: $(echo "$response" | jq -r '.data.ipAddress')" +echo "Veřejná/Whitelisted: $(echo "$response" | jq -r '.data.isWhitelisted')" +echo "Abuse skóre: $(echo "$response" | jq -r '.data.abuseConfidenceScore')% (0-100)" +echo "Celkem hlášení: $(echo "$response" | jq -r '.data.totalReports')" +echo "Země: $(echo "$response" | jq -r '.data.countryCode')" +echo "ISP / Vlastník: $(echo "$response" | jq -r '.data.isp')" +echo "Doména: $(echo "$response" | jq -r '.data.domain')" +echo "Naposledy nahlášena: $(echo "$response" | jq -r '.data.lastReportedAt')" +echo "----------------------------------------" diff --git a/run b/run new file mode 120000 index 0000000..4722d47 --- /dev/null +++ b/run @@ -0,0 +1 @@ +/home/kof/src/RaylibProcessing/run \ No newline at end of file diff --git a/screc b/screc index 1b47311..2c1dae6 100755 --- a/screc +++ b/screc @@ -1,12 +1,23 @@ #!/bin/bash -NAME=$1 -if [ $# -eq 0 ] - then -NAME=recording -fi -(sleep 1; jack_connect SuperCollider:out_1 rec:input_1)& -(sleep 1; jack_connect SuperCollider:out_2 rec:input_2)& -ffmpeg -f jack -i rec -af "afade=t=in:ss=0:d=5" -strict -1 -y ~/recordings/`date +%s`_$NAME.flac -#echo "\\n" -#(sleep 0.1; kill -s SIGSTOP `pidof ffmpeg`; read -rsn1 -p "Press any key to start recording"; kill -s SIGCONT `pidof ffmpeg` ; read -rsn1 -p "Any key to stop it"; kill -SIGINT `pidof ffmpeg`) +NAME="${1:-recording}" +OUT_DIR="$HOME/recordings" + +# Ensure the recordings directory exists +mkdir -p "$OUT_DIR" + +# Background routine to poll ports and link them natively via PipeWire +( + for i in {1..20}; do + if pw-link -i | grep -q "rec:input_1" && pw-link -i | grep -q "rec:input_2"; then + pw-link SuperCollider:out_1 rec:input_1 + pw-link SuperCollider:out_2 rec:input_2 + exit 0 + fi + sleep 0.1 + done + echo "Warning: Timed out waiting for JACK ports." >&2 +)& + +pw-jack ffmpeg -f jack -i rec -c:a libopus -b:a 256k -af "afade=t=in:ss=0:d=5" -y "$OUT_DIR/$(date +%s)_${NAME}.opus" +#FLAC pw-jack ffmpeg -f jack -i rec -af "afade=t=in:ss=0:d=5" -y "$OUT_DIR/$(date +%s)_${NAME}.flac" diff --git a/scrollDown b/scrollDown new file mode 100755 index 0000000..4301161 --- /dev/null +++ b/scrollDown @@ -0,0 +1,2 @@ +#!/bin/bash +while true; do xdotool key Page_Down; sleep 0.2; done diff --git a/scrollUp b/scrollUp new file mode 100755 index 0000000..85f8016 --- /dev/null +++ b/scrollUp @@ -0,0 +1,2 @@ +#!/bin/bash +while true; do xdotool key Page_Up; sleep 0.2; done diff --git a/sqm b/sqm new file mode 100755 index 0000000..9701919 --- /dev/null +++ b/sqm @@ -0,0 +1,36 @@ +#!/bin/bash + +# Nastavení rychlosti (uprav si podle potřeby) +SPEED="19000kbit" + +CMD=$1 +IFACE=$2 + +if [ -z "$CMD" ]; then + CMD="status" +fi + +if [ -z "$IFACE" ]; then + echo "Použití: sudo sqm [start|stop|status] [rozhraní]" + exit 1 +fi + +case "$CMD" in + start) + echo "Aktivuji Cake na $IFACE..." + tc qdisc replace dev "$IFACE" root cake bandwidth "$SPEED" besteffort + ;; + stop) + echo "Vypínám Cake na $IFACE..." + tc qdisc del dev "$IFACE" root 2>/dev/null + ;; + status) + echo "--- SQM status na $IFACE ---" + tc -s qdisc show dev "$IFACE" | grep -A 15 "qdisc cake" + ;; + *) + echo "Neznámý příkaz: $CMD" + echo "Použití: sudo sqm [start|stop|status] [rozhraní]" + exit 1 + ;; +esac diff --git a/stream.sh b/stream.sh index cbcc10f..01be9d2 100755 --- a/stream.sh +++ b/stream.sh @@ -1,14 +1,13 @@ # SAMPLE: FLAC streaming on Windows & Mac while true do - ffmpeg -f jack -i stream \ + ffmpeg -re -f jack -i stream \ -ar 48000 \ -ac 2 \ - -c:a opus \ - -fflags +igndts \ - -f ogg \ - -strict -2 \ - -content_type 'application/ogg' \ - icecast://source:cigareta@pesek.ddns.net:8000/stream.ogg + -c:a libmp3lame \ + -b:a 192k \ + -f mp3 \ + -content_type 'audio/mpeg' \ + icecast://source:cigareta@xn--peek-h6a.com:9000/radio.mp3 sleep 1 done diff --git a/up2 b/up2u2 similarity index 66% rename from up2 rename to up2u2 index 4317daa..eb2b446 100755 --- a/up2 +++ b/up2u2 @@ -1,4 +1,4 @@ #!/bin/bash cd /opt/tor-browser/Browser #./tor-browser --detach "https://chaturbate.com/" -./start-tor-browser "http://privatecams.com" +./start-tor-browser "http://chatrubate.com"