next.js, nginx, reverse-proxy, ssl
$ sudo apt-get update
$ sudo apt-get install nginx letsencrypt| #!/usr/bin/env bash | |
| # ============================================================================== | |
| # Ubuntu System & Runtime Assessment Script (HTML Report Generator) | |
| # Executes diagnostic commands and outputs a self-contained, responsive HTML report. | |
| # | |
| # Usage: | |
| # ./assessment.sh # Generates system_report.html | |
| # ./assessment.sh --markdown (or -m) # Generates system_report.md | |
| # ./assessment.sh --markdown > rep.md # Streams Markdown to stdout | |
| # curl -fsSL <URL> | bash -s -- -m # Execute remotely with Markdown output |
| #!/usr/bin/env bash | |
| # ============================================================================== | |
| # Ubuntu System & Runtime Assessment Script (HTML Report Generator) | |
| # Executes diagnostic commands and outputs a self-contained, responsive HTML report. | |
| # | |
| # Usage: | |
| # ./assessment.sh > report.html | |
| # curl -fsSL https://.../assessment.sh | bash > report.html | |
| # ./assessment.sh # Automatically generates system_report.html | |
| # ============================================================================== |
| package main | |
| import "fmt" | |
| import "strconv" | |
| const ( | |
| MAX_X = 20 | |
| MAX_Y = 20 | |
| ) |
| #!/bin/bash | |
| for i in {1..10} | |
| do | |
| rand=$(( ( RANDOM % 4000 ) + 6000 )) | |
| curl -X GET "http://localhost:8000/broadcast/test/$rand" &2> /dev/null | |
| echo -e "$rand" | |
| sleep 3 | |
| done |
| #!/bin/bash | |
| while true; do; ls -la . | tr -d '\r\n'; echo -n "\r"; sleep 5; done |
| #!/usr/bin/env python | |
| # @author: eugene.santos13@gmail.com | |
| # this will generate json structure for .shuttle.json | |
| import json | |
| import sys, getopt | |
| def parse_opt(argv): | |
| cert_path = '' |
| sysctl -w net.ipv4.ip_forward=1 | |
| iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8080 | |
| iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 443 -j REDIRECT --to-port 8080 |
| “Standard” web video (480p at 500kbit/s): | |
| ffmpeg -i input_file.avi -vcodec libx264 -vprofile high -preset slow -b:v 500k -maxrate 500k -bufsize 1000k -vf scale=-1:480 -threads 0 -acodec libvo_aacenc -b:a 128k output_file.mp4 | |
| 360p video for older mobile phones (360p at 250kbit/s in baseline profile): | |
| ffmpeg -i inputfile.avi -vcodec libx264 -vprofile baseline -preset slow -b:v 250k -maxrate 250k -bufsize 500k -vf scale=-1:360 -threads 0 | |
| -acodec libvo_aacenc -ab 96k output.mp4 | |
| 480p video for iPads and tablets (480p at 400kbit/s in main profile): |