Skip to content

Instantly share code, notes, and snippets.

@abhi-io
abhi-io / Enable VNC Server
Last active January 5, 2021 17:23
Launch AWS EC2 Mac Instances - Enable VNC Server
sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart \
-activate -configure -access -on \
-configure -allowAccessFor -specifiedUsers \
-configure -users ec2-user \
-configure -restart -agent -privs -all
sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart \
-configure -access -on -privs -all -users ec2-user
@abhi-io
abhi-io / Install FFmpeg
Last active February 27, 2021 15:39
Deploy Live Video Streaming over HTTPS server
sudo apt update
sudo apt install -y ffmpeg
ffmpeg -version
sudo apt install -y docker.io
docker -v
@abhi-io
abhi-io / nginx-rtmp
Created February 27, 2021 15:56
nginx-rtmp streaming docker
git clone https://github.com/alfg/docker-nginx-rtmp.git
├── Dockerfile <<<<<<< have to edit
├── Dockerfile.cuda
├── LICENSE
├── README.md
├── certs
│   ├── example.com.crt <<<<<<< have to edit
│   └── example.com.key <<<<<<< have to edit
├── docker-compose.yml
├── nginx-cuda.conf
├── nginx.conf <<<<<<< have to edit
docker build -t nginx-rtmp .
docker run -itd -p 1935:1935 -p 8080:80 -p 443:443 --rm nginx-rtmp
ffmpeg -re -i VIDEO-FILE.mp4 -vcodec libx264 -vprofile baseline -g 30 -acodec aac -strict -2 -f flv rtmp://IP/key01/value01
##this is in for loop for testing purpose
for i in {1..100000}; do ffmpeg -re -i VIDEO-FILE.mp4 -vcodec libx264 -vprofile baseline -g 30 -acodec aac -strict -2 -f flv rtmp://IP:1935/stone1/age2; done
@abhi-io
abhi-io / docker-compose.yml
Last active August 5, 2021 20:31
CEPH docker-compose.yml
version: "3.5"
services:
ceph:
image: ceph/daemon:v5.0.8-stable-5.0-octopus-centos-8
container_name: demo-ceph
command: demo
hostname: ceph-demo
ports:
- 5000:5000
- 8000:8000
@abhi-io
abhi-io / Amazon S3 Command Line
Created August 5, 2021 21:16
s3cmd API calls
Make bucket
s3cmd mb s3://BUCKET
Remove bucket
s3cmd rb s3://BUCKET
List objects or buckets
s3cmd ls [s3://BUCKET[/PREFIX]]
List all object in all buckets
s3cmd la
Put file into bucket
s3cmd put FILE [FILE...] s3://BUCKET[/PREFIX]
@abhi-io
abhi-io / get cephadm tool
Created August 7, 2021 07:11
install ceph
curl --silent --remote-name --location https://github.com/ceph/ceph/raw/octopus/src/cephadm/cephadm
sudo mv cephadm /usr/local/bin
sudo chmod +x /usr/local/bin/cephadm
sudo mkdir -p /etc/ceph