Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
#smooker@shd2 /mnt/md127/home/smooker/src/openssl $ cat go.sh
#!/bin/bash
./Configure linux-mips32
make CC=mips-openwrt-linux-gcc -j20
diff --git a/Ghidra/Features/Decompiler/src/decompile/cpp/float.cc b/Ghidra/Features/Decompiler/src/decompile/cpp/float.cc
index 23bd6b385..6db943bce 100644
--- a/Ghidra/Features/Decompiler/src/decompile/cpp/float.cc
+++ b/Ghidra/Features/Decompiler/src/decompile/cpp/float.cc
@@ -17,6 +17,9 @@
#include "float.hh"
#include "address.hh"
+#include <limits.h>
+#include <limits>
@smooker
smooker / nvidia-cuda-toolkit-12.0.0.ebuild
Created January 9, 2023 07:33
cuda 12.0 for gentoo w/o memcheck !?
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit check-reqs toolchain-funcs unpacker
DRIVER_PV="525.60.13"
DESCRIPTION="NVIDIA CUDA Toolkit (compiler and friends)"
#!/bin/bash
#iptables -A LOG_DROP -j LOG --log-prefix "INPUT:DROP: " --log-level 6
#
iptables -F LAI4
iptables -F LAO4
iptables -F LAF4
iptables -F LDI4
iptables -F LDO4
iptables -F LDF4
@smooker
smooker / convert3.sh
Created December 21, 2022 04:49
3.6GB to 915MB video size reduction without quality loss
#!/bin/bash
#ffmpeg -y -v debug -i $1 -max_muxing_queue_size 9999 -c:v hevc_nvenc -preset p7 -an $2
#-filter:v "setpts=0.5*PTS"
#ffmpeg -y -v debug -i $1 -max_muxing_queue_size 9999 -c:v hevc_nvenc -preset p7 -an -r 30 -filter:v "setpts=0.02*PTS" $2
#ffmpeg -y -loglevel info -threads 4 -hwaccel nvdec -i $1 -max_muxing_queue_size 9999 -c:v hevc_nvenc -preset p7 -an -r 30 -filter:v "select=gt(scene\,0.01),metadata=print,setpts=0.02*PTS" -flush_packets 1 $2
#ffmpeg -y -loglevel info -threads 4 -hwaccel nvdec -i $1 -max_muxing_queue_size 9999 -c:v hevc_nvenc -preset p7 -an -filter:v "setpts=0.01*PTS" -filter:a "atempo=100.0" -r 60 -flush_packets 1 $2
#ffmpeg -y -loglevel info -threads 4 -hwaccel nvdec -i $1 -max_muxing_queue_size 9999 -c:v hevc_nvenc -preset p7 -filter_complex "[0:v]fps=10,setpts=0.1*PTS[v];[0:a]atempo=1.0[a]" -map "[v]" -map "[a]" -r 10 -flush_packets 1 $2
@smooker
smooker / backup.sh
Created December 9, 2022 05:41
BASH backup script eval tar pigz
#!/bin/bash
TAR="/bin/tar --use-compress-program=\"pigz --best --recursive | pv\" -cf"
#echo $TAR
#exit
eval ${TAR[@]} ./etc.tar.gz /etc
eval ${TAR[@]} ./usr.share.tar.gz /usr/share
eval ${TAR[@]} ./smooker.config.tar.gz /home/smooker/.config
@smooker
smooker / rtsp-simple-server.yml
Created November 9, 2022 09:28
rtsp-simple-server transcode
# General options
# sets the verbosity of the program; available values are "warn", "info", "debug".
logLevel: info
# destinations of log messages; available values are "stdout", "file" and "syslog".
logDestinations: [stdout]
# if "file" is in logDestinations, this is the file which will receive the logs.
logFile: rtsp-simple-server.log
# timeout of read operations.
readTimeout: 10s
# timeout of write operations.
find . -iname "*flac" -type f -exec mpv {} \;
#!/bin/bash
#ffmpeg -re -stream_loop -1 -strict 1 -y -vsync 1 -threads:v 2 -threads:a 8 -filter_threads 2 -thread_queue_size 512 -hwaccel cuda -hwaccel_output_format cuda -f v4l2 -input_format mjpeg -video_size 1920x1080 -framerate 25 -extra_hw_frames 9 -i /dev/video0 -f pulse -i default -bsf:a aac_adtstoasc -c:a aac -ac 2 -b:a 128k -c:v h264_nvenc -b:v 5M -f rtsp -rtsp_transport tcp rtsp://localhost:8554/proxy1
ffmpeg -re -stream_loop -1 -strict 1 -y -vsync 1 -threads:v 2 -threads:a 8 -filter_threads 2 -thread_queue_size 64 -hwaccel cuda -hwaccel_output_format cuda -extra_hw_frames 16 -f v4l2 -input_format mjpeg -video_size 1920x1080 -framerate 25 -extra_hw_frames 16 -i /dev/video0 -f pulse -i default -bsf:a aac_adtstoasc -c:a aac -ac 2 -b:a 128k -c:v h264_nvenc -b:v 5M -f rtsp -rtsp_transport tcp rtsp://localhost:8554/proxy1
#!/usr/bin/perl
#ffmpeg -y -loglevel info -threads 4 -hwaccel nvdec -i $1 -i $2 -i $3 -filter_complex "\
#[0:v]trim=50:,setpts=PTS-STARTPTS[v0]; \
#[1:v]trim=0:,setpts=PTS-STARTPTS[v1]; \
#[2:v]trim=0:,setpts=PTS-STARTPTS[v2]; \
#[v0][v1][v2]concat=n=3:v=1:a=0[out]" \
#-map "[out]" output3.mkv