Skip to content

Instantly share code, notes, and snippets.

View bossjones's full-sized avatar
💭
Learning every damn thing I can

Malcolm Jones (bossjones/Tony Dark) bossjones

💭
Learning every damn thing I can
View GitHub Profile
@bossjones
bossjones / install_slack_cli.sh
Created April 10, 2024 14:29
install_slack_cli.sh
# Instructions: https://api.slack.com/automation/quickstart
# check permissions of your /usr/local/bin dir (slack needs /usr/local/bin to be owned by the user)
# should look like:
# # before
# ❯ ls -lta /usr/local/ | grep bin
# drwxr-xr-x 20 root wheel 640 Mar 20 10:37 bin
# # after
# ❯ ls -lta /usr/local/ | grep bin
@bossjones
bossjones / example_check_existence_of_command.sh
Created March 20, 2024 15:36
example_check_existence_of_command.sh
#!/usr/bin/env bash
# SOURCE: https://github.com/kodekloudhub/certified-kubernetes-administrator-course/blob/master/kubeadm-clusters/apple-silicon/deploy-virtual-machines.sh
# When VMs are deleted, IPs remain allocated in dhcpdb
# IP reclaim: https://discourse.ubuntu.com/t/is-it-possible-to-either-specify-an-ip-address-on-launch-or-reset-the-next-ip-address-to-be-used/30316
ARG=$1
set -euo pipefail
# Set the build mode
@bossjones
bossjones / get_images_via_chrome_console.js
Created December 12, 2023 03:16
get_images_via_chrome_console.js
function img_find() {
return Array.from(document.getElementsByTagName("img")).map(i => i.src);
}
img_find()
@bossjones
bossjones / weave_scope_plugins.sh
Created December 11, 2023 23:37
install weave scope plugins
docker pull weaveworksplugins/scope-iowait:latest
docker run --rm -ti \
--net=host \
-v /var/run/scope/plugins:/var/run/scope/plugins \
--name weaveworksplugins-scope-iowait weaveworksplugins/scope-iowait:latest
docker pull weaveworksplugins/scope-http-statistics:latest
sudo docker run --rm -it \
--privileged --net=host --pid=host \
-v /lib/modules:/lib/modules \
@bossjones
bossjones / security_onion_logs.sh
Created December 11, 2023 02:12
get all security onion logs
cd /opt/so/log
tail -f $(find . ! \( -name "*.gz" \) -type f -print) | ccze -A
@bossjones
bossjones / fix_ntpd_ubuntu.sh
Last active December 6, 2023 04:59
fix nptd on ubuntu 22.04
# https://cognoz.github.io/ntp-configure-in-secure-envs/
sudo groupadd power
sudo usermod --groups power --append $USER
ln -s /etc/apparmor.d/usr.sbin.ntpd /etc/apparmor.d/disable/
apparmor_parser -R /etc/apparmor.d/usr.sbin.ntpd
ln -s /etc/apparmor.d/usr.sbin.unbound /etc/apparmor.d/disable/
sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.unbound
sudo service ntp stop
@bossjones
bossjones / rust_cli_install.sh
Last active December 14, 2023 19:49
rust cli utilities to install
rustup update
sudo apt install build-essential libxcb1-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev -y
# for centos or anyhting w/ /tmp mounted as noexec # export TMPDIR=/root/tmp
cargo install lms
cargo install procs
cargo install bandwhich
cargo install sd
cargo install lms
@bossjones
bossjones / sync_backups.sh
Last active February 21, 2024 20:01
using rust's lms to perform parallel backups between ssd and external. Also see sync command.
#!/usr/bin/env bash
lms cp ~/Downloads/ /Volumes/elements4tb2022/backups/silicontop/Downloads
lms cp ~/Movies/ /Volumes/elements4tb2022/backups/silicontop/Movies
lms cp ~/Music/ /Volumes/elements4tb2022/backups/silicontop/Music
lms cp ~/dwhelper/ /Volumes/elements4tb2022/backups/silicontop/dwhelper
lms cp ~/Desktop/ /Volumes/elements4tb2022/backups/silicontop/Desktop
lms cp ~/Documents/ /Volumes/elements4tb2022/backups/silicontop/Documents
lms cp ~/cerebro/ /Volumes/elements4tb2022/backups/silicontop/cerebro
lms cp ~/DavinciMovies/ /Volumes/elements4tb2022/backups/silicontop/DavinciMovies
@bossjones
bossjones / slow_motion_4x.md
Created September 22, 2023 21:24
via topaz video AI

can you explain this ffmpeg command to me, step by step please: ffmpeg -hide_banner -t 5.705705705705706 -i /Users/malcolm/Downloads/test.mp4 -sws_flags spline+accurate_rnd+full_chroma_int -color_trc 1 -colorspace 1 -color_primaries 1 -filter_complex "tvai_fi=model=chr-2:slowmo=4:rdt=0.01:fps=29.97:device=0:vram=1:instances=1,tvai_up=model=prob-3:scale=0:w=576:h=1024:preblur=0:noise=0:details=0:halo=0:blur=0:compression=0:estimate=20:blend=0.2:grain=0.05:gsize=2:device=0:vram=1:instances=1,scale=out_color_matrix=bt709" -c:v h264_videotoolbox -profile:v high -pix_fmt yuv420p -allow_sw 1 -b:v 0 -q:v 82 -map 0:a -map_metadata:s:a:0 0:s:i:2 -c:a copy -bsf:a:0 aac_adtstoasc -map_metadata 0 -map_metadata:s:v 0:s:v -movflags "frag_keyframe+empty_moov+delay_moov+use_metadata_tags+write_colr -metadata videoai=Slowmo 400% and framerate changed to 29.97 using chr-2 ignoring duplicate frames. Enhanced using prob-3 auto with recover details at 0; dehalo at 0; reduce noise at 0; sharpen at 0; revert compression at 0; ant

@bossjones
bossjones / sdl12-compat.rb
Created August 21, 2023 23:02
sdl12-compat.rb 8/21/2023 just in case it gets removed from homebrew since its deprecated
class Sdl12Compat < Formula
desc "SDL 1.2 compatibility layer that uses SDL 2.0 behind the scenes"
homepage "https://github.com/libsdl-org/sdl12-compat"
url "https://github.com/libsdl-org/sdl12-compat/archive/refs/tags/release-1.2.64.tar.gz"
sha256 "3e308e817c7f0c6383225485e9a67bf1119ad684b8cc519038671cc1b5d29861"
license all_of: ["Zlib", "MIT-0"]
head "https://github.com/libsdl-org/sdl12-compat.git", branch: "main"
bottle do
sha256 cellar: :any, arm64_ventura: "ebad05b905bb7c02a03774c61739a80c873452c71005bd530f2a8631b90d18c7"